public static AnimationCurve Draw(this AnimationCurve current, UnityLabel label = null, bool indention = true) { return(EditorUI.Draw(() => EditorGUILayout.CurveField(label, current, EditorUI.CreateLayout()), indention)); }
public static Color Draw(this Color current, UnityLabel label = null, bool indention = true) { return(EditorUI.Draw(() => 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 Vector4 DrawVector4(this Vector4 current, UnityLabel label = null, bool indention = true) { return(EditorUI.Draw(() => EditorGUILayout.Vector4Field(label.ToString(), 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(() => 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(() => EditorGUILayout.Slider(label, current, min, max, EditorUI.CreateLayout()), indention)); }
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); }