public static AnimationCurve Draw(this AnimationCurve current, UnityLabel label = null, bool indention = true) { return(EditorUI.Draw <AnimationCurve>(() => EditorGUILayout.CurveField(label, current, EditorUI.CreateLayout()), indention)); }
public static Color Draw(this Color current, UnityLabel label = null, bool indention = true) { return(EditorUI.Draw <Color>(() => EditorGUILayout.ColorField(label, current, EditorUI.CreateLayout()), indention)); }
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); }
public static Rect Draw(this Rect current, UnityLabel label = null, bool indention = true) { return(EditorUI.Draw <Rect>(() => EditorGUILayout.RectField(label, current, EditorUI.CreateLayout()), indention)); }
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)); }
public static Vector3 DrawVector3(this Vector3 current, UnityLabel label = null, bool indention = true) { return(EditorUI.Draw <Vector3>(() => EditorGUILayout.Vector3Field(label, current, EditorUI.CreateLayout()), indention)); }
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)); }
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)); }
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)); }