以下摘自官方文档:(http://docs.unity3d.com/Manual/AnimationScripting.html) Additive animations allow you to overlay the effects of one animation on top of any others that may be playing. When generating additive animations, Unity will calculate the difference…
GUI splitter control How can I make a GUI splitter control, similar to the splitter the console has? using UnityEngine; using UnityEditor; public class GUISplitter : EditorWindow { Vector2 posLeft; Vector2 posRight; GUIStyle styleLeftView; GUIStyle s…
Unity编辑器 - DragAndDrop拖拽控件 Unity编辑器的拖拽(DragAndDrop)在网上能找到的资料少,自己稍微研究了一下,写了个相对完整的案例,效果如下 代码: object dragData = "dragData"; Vector2 offset; Color col = new Color(1, 0, 0, 0.6f); Rect rect1 = new Rect(20, 10, 100, 20); Rect rect2 = new Rect(20, 60,…
https://www.xuanyusong.com/archives/category/unity/unity3deditor 1 using UnityEngine; public class Test : MonoBehaviour { public Rect rect; public Texture texture; } using UnityEngine; using UnityEditor; [CustomEditor(typeof(Test))] public class MyEd…