上一页 1 2 3 4 5 6 7 ··· 9 下一页
摘要: 不过在使用时需要先获取两个红色显示的变量,graphicRaycaster和eventSystem。 这两个变量分别对应的是Canvas中的GraphicRaycaster组件和创建UI时自动生成的“EventSystem”中的EventSystem组件。 引用 using UnityEngine; 阅读全文
posted @ 2017-11-27 10:48 U3DEngineer 阅读(2476) 评论(0) 推荐(0) 编辑
摘要: enum RotationAxes { MouseXAndY, MouseX, MouseY } RotationAxes axes = RotationAxes.MouseXAndY; //@HideInInspector float sensitivityX = 15; //@HideInInspector float sensitivityY = 15; //private float m... 阅读全文
posted @ 2017-11-24 22:01 U3DEngineer 阅读(7683) 评论(0) 推荐(0) 编辑
摘要: 另一种遍历方式: 阅读全文
posted @ 2017-11-24 12:56 U3DEngineer 阅读(183) 评论(0) 推荐(0) 编辑
摘要: 关节 布料 关节 关节 布料 关节 铰链关节(Hinge Joint):将两个物体以链条的形式绑在一起,当力量过大超过链条的固定力矩时,两个物体就会产生相互的拉力。 固定关节(Fixed Joint):将两个物体永远以相对的位置固定在一起,即使发生物理改变,它们之间的相对位置也不会发生改变。 弹簧关 阅读全文
posted @ 2017-11-24 10:00 U3DEngineer 阅读(768) 评论(0) 推荐(0) 编辑
摘要: GameObject canvas; int num = 20; float angle = 0; private float shortRadius=200; float longRadius = 450; Dictionary storeItem; GameObject main; public static bool run ... 阅读全文
posted @ 2017-11-10 21:21 U3DEngineer 阅读(1385) 评论(0) 推荐(0) 编辑
摘要: //保存需要排序的精灵容器 public GameObject[] Sprites; public Transform centrePoint;//椭圆的中心点 public float anglecheap = 25;//每个方块间的角度偏移 //保存位置点 private L... 阅读全文
posted @ 2017-11-10 16:19 U3DEngineer 阅读(727) 评论(0) 推荐(0) 编辑
摘要: 1、非线程安全(经典模式),但没有考虑线程安全,在多线程时可能会出问题,不过还从没看过出错的现象。 /// <summary> /// 单例模式的实现 /// </summary> public class Singleton { // 定义一个静态变量来保存类的实例 private static 阅读全文
posted @ 2017-10-31 17:45 U3DEngineer 阅读(304) 评论(0) 推荐(0) 编辑
摘要: using UnityEngine; using System.Collections; using Assets.Code.myclass; using UnityEngine.UI; using DG.Tweening; using UnityEngine.EventSystems; public class ButtonEventTriggerListener : MonoBehavio... 阅读全文
posted @ 2017-10-26 09:17 U3DEngineer 阅读(5486) 评论(0) 推荐(0) 编辑
摘要: unity中使用Image组件更换Logo图片属性如下:1、sprite 用来渲染图像的精灵。 2、overrideSprite 设置用于呈现的覆盖精灵,设置为null将恢复默认的srpite。 unity中使用RawImage组件更换图片属性是 texture (RawImage的纹理) 阅读全文
posted @ 2017-10-19 19:46 U3DEngineer 阅读(1696) 评论(0) 推荐(0) 编辑
摘要: http://www.blogclock.cn/index.aspx 阅读全文
posted @ 2017-10-19 09:28 U3DEngineer 阅读(227) 评论(0) 推荐(0) 编辑
摘要: 1、在unity3D的Project视图下选中需要更改的图片,将图片的Texture Type更改为Sprite (2D and UI),点击Apply即可。操作如图所示: 2、完成步骤一,点击Apply之后UI图片效果如图所示: 3、更改UI图片Inspector视图中Sprite Mode为Mu 阅读全文
posted @ 2017-10-09 14:34 U3DEngineer 阅读(4478) 评论(0) 推荐(0) 编辑
摘要: private int zRotation; public GameObject obj; public void Update() { //obj = GameObject.Find("Camera"); //获取名为Camera的相机对象 zRotation = player.transform 阅读全文
posted @ 2017-09-28 10:36 U3DEngineer 阅读(1541) 评论(0) 推荐(0) 编辑
摘要: 案例展示 SubMenuManage类中的实例化代码如下: static SubMenuManage sub_this; public static SubMenuManage Instance() { if (sub_this == null) { sub_this = new SubMenuMa 阅读全文
posted @ 2017-09-22 17:06 U3DEngineer 阅读(5585) 评论(1) 推荐(0) 编辑
摘要: public void ScreenUISelfAdptation(Transform scaleUI) { float widthrate = UnityEngine.Screen.width / 1920.0f; float heightrate = UnityEngine.Screen.hei 阅读全文
posted @ 2017-09-21 19:56 U3DEngineer 阅读(1396) 评论(0) 推荐(0) 编辑
摘要: 错误如下: Unhandled Exception: System.TypeLoadException: Could not load type 'System.ComponentModel.InitializationEventAttribute' from assembly 'System.Wi 阅读全文
posted @ 2017-09-18 15:27 U3DEngineer 阅读(3783) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 ··· 9 下一页