static void DoCreatePlayHavenContentRequesterObject() { GameObject go = ObjectCreationEditor.CreateGameObjectInScene("PlayHavenContentRequester"); go.AddComponent <PlayHavenContentRequester>(); Selection.activeGameObject = go; }
static void DoCreatePlayHavenManagerObject() { if (ExistingComponentTypeExists(typeof(PlayHavenManager))) { EditorUtility.DisplayDialog("Sorry!", "A PlayHavenManager component is already located in this scene.", "OK"); } else { GameObject go = ObjectCreationEditor.CreateGameObjectInScene("PlayHavenManager"); go.AddComponent <PlayHavenManager>(); go.transform.parent = null; Selection.activeGameObject = go; } }