/// <summary>
 /// Called when the inspector of the Editor is drawn.
 /// This implementation calls OnBeforeInspectorGUI() on all the editor extensions, draws the original inspector, and ends by
 /// calling OnInspectorGUI on all the editor extensions.
 /// </summary>
 public override void OnInspectorGUI()
 {
     ExtensionsManager.DrawCustomEditorsBeforeInspectorGUI();
     if (NativeEditor != null)
     {
         NativeEditor.OnInspectorGUI();
     }
     ExtensionsManager.DrawCustomEditorsInspectorGUI();
 }
示例#2
0
 /// <summary>
 /// Called when the inspector of the Editor is drawn.
 /// This implementation calls OnBeforeInspectorGUI() on all the editor extensions, draws the original inspector, and ends by
 /// calling OnInspectorGUI on all the editor extensions.
 /// </summary>
 public override void OnInspectorGUI()
 {
     DrawCustomEditorsBeforeInspectorGUI();
     if (NativeEditor != null)
     {
         NativeEditor.OnInspectorGUI();
     }
     DrawCustomEditorsInspectorGUI();
 }
示例#3
0
        /// <summary>
        /// Called when this editor is disabled.
        /// Destroys the created native editor properly in order to avoid memory leaks.
        /// By default, executes the OnDisable() method on the native editor, and destroys it using Object.DestroyImmediate().
        /// </summary>
        /// <param name="_NativeEditor">The created native Editor instance.</param>
        protected virtual void DestroyNativeEditor(Editor _NativeEditor)
        {
            MethodInfo disableMethod = NativeEditor.GetType()
                                       .GetMethod("OnDisable", BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.Public);

            if (disableMethod != null)
            {
                disableMethod.Invoke(NativeEditor, null);
            }
            DestroyImmediate(NativeEditor);
        }
 /// <summary>
 /// Called when the header of the Editor is drawn.
 /// This implementation calls OnBeforeHeaderGUI() on all the editor extensions, draws the original header, and ends by calling
 /// OnHeaderGUI on all the editor extensions.
 /// </summary>
 protected override void OnHeaderGUI()
 {
     ExtensionsManager.DrawCustomEditorsBeforeHeaderGUI();
     if (NativeEditor != null)
     {
         NativeEditor.DrawHeader();
         if (ApplyHeaderOffset)
         {
             GUILayout.Space(MultipleEditorsUtility.COMMON_HEADER_OFFSET);
         }
     }
     ExtensionsManager.DrawCustomEditorsHeaderGUI();
 }
        public override void OnInspectorGUI()
        {
            ExtensionsManager.DrawCustomEditorsBeforeInspectorGUI();
            if (NativeEditor != null)
            {
                NativeEditor.OnInspectorGUI();
            }

#if UNITY_2019_1_OR_NEWER
            ExtensionsManager.DrawCustomEditorsInspectorGUI();
#else
            EditorGUILayout.EndHorizontal();
            ExtensionsManager.DrawCustomEditorsInspectorGUI();
            //EditorGUILayout.EndVertical();
            EditorGUILayout.EndScrollView();
            EditorGUIUtility.ExitGUI();
#endif
        }
        protected override void OnHeaderGUI()
        {
#if UNITY_2019_1_OR_NEWER
#else
            if (target.IsAsset())
            {
                GUILayout.Space(ROOT_PREFAB_NOTE_OFFSET);
                GUIStyle header = new GUIStyle("AC BoldHeader");
                GUILayout.Box("", header, GUILayout.ExpandWidth(true));

                GUILayout.Space(ASSET_HEADER_CONTENT_OFFSET);
            }
#endif
            ExtensionsManager.DrawCustomEditorsBeforeHeaderGUI();
            NativeEditor.DrawHeader();
            GUILayout.Space(HEADER_CONTENT_OFFSET);
            ExtensionsManager.DrawCustomEditorsHeaderGUI();
        }
示例#7
0
 /// <summary>
 /// Called when the header of the Editor is drawn.
 /// This implementation calls OnBeforeHeaderGUI() on all the editor extensions, draws the original header, and ends by calling
 /// OnHeaderGUI on all the editor extensions.
 /// </summary>
 protected override void OnHeaderGUI()
 {
     DrawCustomEditorsBeforeHeaderGUI();
     NativeEditor.DrawHeader();
     DrawCustomEditorsHeaderGUI();
 }