Пример #1
0
 public static AnimationCurve Draw(this AnimationCurve current, UnityLabel label = null, bool indention = true)
 {
     return(EditorUI.Draw(() => 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(() => 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 Vector4 DrawVector4(this Vector4 current, UnityLabel label = null, bool indention = true)
 {
     return(EditorUI.Draw(() => EditorGUILayout.Vector4Field(label.ToString(), current, EditorUI.CreateLayout()), indention));
 }
Пример #5
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(() => EditorGUILayout.ObjectField(label, current, typeof(Type), allowScene, EditorUI.CreateLayout()), indention));
 }
Пример #6
0
 public static float DrawSlider(this float current, float min, float max, UnityLabel label = null, bool indention = true)
 {
     return(EditorUI.Draw(() => EditorGUILayout.Slider(label, current, min, max, EditorUI.CreateLayout()), indention));
 }
Пример #7
0
 public static void DrawPrefix(this UnityLabel current, GUIStyle style = null, GUIStyle followStyle = null, bool indention = true)
 {
     style       = style ?? EditorStyles.label;
     followStyle = followStyle ?? GUI.skin.button;
     EditorUI.Draw(() => EditorGUILayout.PrefixLabel(current, followStyle, style), indention);
 }