Exemplo n.º 1
0
        public static int       PingObject(GUIContent content, UnityEngine.Object asset, GUIStyle style, params GUILayoutOption[] options)
        {
            if (style == null)
            {
                style = GUI.skin.button;
            }

            if (GUILayout.Button(content, style, options) == true)
            {
                return(NGEditorGUILayout.PingObject(asset));
            }
            return(0);
        }
Exemplo n.º 2
0
        public static int       PingObject(Rect r, GUIContent content, UnityEngine.Object asset, GUIStyle style)
        {
            if (style == null)
            {
                style = GUI.skin.button;
            }

            if (GUI.Button(r, content, style) == true)
            {
                return(NGEditorGUILayout.PingObject(asset));
            }
            return(0);
        }
Exemplo n.º 3
0
        public void     OnGUI()
        {
            if (this.GUIInitializer != null)
            {
                this.GUIInitializer.InitGUI();
            }

            GUILayout.BeginHorizontal();
            {
                GUILayout.FlexibleSpace();

                NGEditorGUILayout.PingObject("Ping", this.instance);
            }
            GUILayout.EndHorizontal();

            AutoExposeSettings <T> .methodUpdateIfRequiredOrScript.Invoke(this.serializedObject, null);           // #UNITY_MULTI_VERSION

            for (int i = 0; i < this.serializedProperties.Length; i++)
            {
                EditorGUILayout.PropertyField(this.serializedProperties[i], true);
            }

            this.serializedObject.ApplyModifiedProperties();
        }
Exemplo n.º 4
0
 public static Enum      EnumPopup(Rect r, Enum e)
 {
     return(NGEditorGUILayout.EnumPopup(r, string.Empty, e));
 }
Exemplo n.º 5
0
 public static bool      Switch(string label, bool value)
 {
     return(NGEditorGUILayout.Switch(GUILayoutUtility.GetRect(0F, Constants.SingleLineHeight), label, value));
 }
Exemplo n.º 6
0
 public static bool      Switch(Rect position, bool value)
 {
     return(NGEditorGUILayout.Switch(position, string.Empty, value));
 }
Exemplo n.º 7
0
 public static int       PingObject(string label, UnityEngine.Object asset, GUIStyle style, params GUILayoutOption[] options)
 {
     NGEditorGUILayout.content.text = label;
     return(NGEditorGUILayout.PingObject(NGEditorGUILayout.content, asset, style, options));
 }
Exemplo n.º 8
0
 public static int       PingObject(Rect r, string label, UnityEngine.Object asset)
 {
     NGEditorGUILayout.content.text = label;
     return(NGEditorGUILayout.PingObject(r, NGEditorGUILayout.content, asset, null));
 }
Exemplo n.º 9
0
 public static string    OpenFolderField(Rect r, string label, string path, FieldButtons buttons = FieldButtons.All)
 {
     return(NGEditorGUILayout.OpenFolderField(r, label, path, string.Empty, buttons));
 }