public Editor GetOrCreateEditor( Object target ) { Editor editor = null; if ( m_editors.TryGetValue( target, out editor ) ) return editor; editor = InspectorEditor.CreateRecursive( target ); m_editors.Add( target, editor ); return editor; }
public Editor GetOrCreateEditor(Object target) { // We get null reference exception when we destroy a // GameObjectInspector and OnInspectorGUI doesn't show // anything, it probably requires more, but still it's // not desired to recurse the whole GameObject. if (target is GameObject) { return(null); } Editor editor = null; if (m_editors.TryGetValue(target, out editor)) { return(editor); } editor = InspectorEditor.CreateRecursive(target); m_editors.Add(target, editor); return(editor); }