コード例 #1
0
 public static AnimationCurve Draw(this AnimationCurve current, UnityLabel label = null, bool indention = true)
 {
     return(EditorUI.Draw <AnimationCurve>(() => EditorGUILayout.CurveField(label, current, EditorUI.CreateLayout()), indention));
 }
コード例 #2
0
 public static Color Draw(this Color current, UnityLabel label = null, bool indention = true)
 {
     return(EditorUI.Draw <Color>(() => EditorGUILayout.ColorField(label, current, EditorUI.CreateLayout()), indention));
 }
コード例 #3
0
        public static void Draw(this SerializedProperty current, UnityLabel label = null, bool allowScene = true, bool indention = true)
        {
            if (label != null && label.value.text.IsEmpty())
            {
                label = new GUIContent(current.displayName);
            }
            Action action = () => EditorGUILayout.PropertyField(current, label, allowScene, EditorUI.CreateLayout());

            EditorUI.Draw(action, indention);
        }
コード例 #4
0
 public static Rect Draw(this Rect current, UnityLabel label = null, bool indention = true)
 {
     return(EditorUI.Draw <Rect>(() => EditorGUILayout.RectField(label, current, EditorUI.CreateLayout()), indention));
 }
コード例 #5
0
 public static Vector4 DrawVector4(this Vector4 current, UnityLabel label = null, bool indention = true)
 {
     return(EditorUI.Draw <Vector4>(() => EditorGUILayout.Vector4Field(label.ToString(), current, EditorUI.CreateLayout()), indention));
 }
コード例 #6
0
 public static Vector3 DrawVector3(this Vector3 current, UnityLabel label = null, bool indention = true)
 {
     return(EditorUI.Draw <Vector3>(() => EditorGUILayout.Vector3Field(label, current, EditorUI.CreateLayout()), indention));
 }
コード例 #7
0
 public static Type Draw <Type>(this UnityObject current, UnityLabel label = null, bool allowScene = true, bool indention = true) where Type : UnityObject
 {
     return((Type)EditorUI.Draw <UnityObject>(() => EditorGUILayout.ObjectField(label, current, typeof(Type), allowScene, EditorUI.CreateLayout()), indention));
 }
コード例 #8
0
 public static float DrawSlider(this float current, float min, float max, UnityLabel label = null, bool indention = true)
 {
     return(EditorUI.Draw <float>(() => EditorGUILayout.Slider(label, current, min, max, EditorUI.CreateLayout()), indention));
 }
コード例 #9
0
 public static int DrawSlider(this int current, int min, int max, UnityLabel label = null, bool indention = true)
 {
     return(EditorUI.Draw <int>(() => EditorGUILayout.IntSlider(label, current, min, max, EditorUI.CreateLayout()), indention));
 }