Пример #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);
        }
Пример #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);
        }
Пример #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();
        }
Пример #4
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));
 }
Пример #5
0
 public static int       PingObject(Rect r, string label, UnityEngine.Object asset)
 {
     NGEditorGUILayout.content.text = label;
     return(NGEditorGUILayout.PingObject(r, NGEditorGUILayout.content, asset, null));
 }