예제 #1
0
 public static Editor CreateEditor(UnityEngine.Object targetObject, [DefaultValue("null")] Type editorType)
 {
     return(Editor.CreateEditorWithContext(new UnityEngine.Object[]
     {
         targetObject
     }, null, editorType));
 }
예제 #2
0
 public static void CreateCachedEditorWithContext(UnityEngine.Object[] targetObjects, UnityEngine.Object context, Type editorType, ref Editor previousEditor)
 {
     if (!(previousEditor != null) || !ArrayUtility.ArrayEquals <UnityEngine.Object>(previousEditor.m_Targets, targetObjects) || !(previousEditor.m_Context == context))
     {
         if (previousEditor != null)
         {
             UnityEngine.Object.DestroyImmediate(previousEditor);
         }
         previousEditor = Editor.CreateEditorWithContext(targetObjects, context, editorType);
     }
 }
예제 #3
0
        public static Editor CreateEditorWithContext(UnityEngine.Object[] targetObjects, UnityEngine.Object context)
        {
            Type editorType = null;

            return(Editor.CreateEditorWithContext(targetObjects, context, editorType));
        }