예제 #1
0
        public override void OnInspectorGUI()
        {
            //Initialization
            m_editorUtils.Initialize(); // Do not remove this!

            if (m_profile == null)
            {
                //Get GaiaHierarchyUtils Profile object
                m_profile = (GaiaHierarchyUtils)target;
            }

            //Monitor for changes
            EditorGUI.BeginChangeCheck();

            m_editorUtils.Panel("GlobalSettings", GlobalSettings, true);

            //Check for changes, make undo record, make changes and let editor know we are dirty
            if (EditorGUI.EndChangeCheck())
            {
                Undo.RecordObject(m_profile, "Made changes");
                EditorUtility.SetDirty(m_profile);

                m_profile.SetupHideInHierarchy();
                m_settingsChangedInfo = true;
            }
        }
예제 #2
0
        private void OnEnable()
        {
            //Get GaiaHierarchyUtils Profile object
            m_profile = (GaiaHierarchyUtils)target;

            //Gets all the objects
            m_profile.UpdateParentObjects();

            if (m_editorUtils == null)
            {
                // Get editor utils for this
                m_editorUtils = PWApp.GetEditorUtils(this);
            }

            m_guiBackground       = GUI.backgroundColor;
            m_settingsChangedInfo = false;
        }