static void Init() { // Get existing open window or if none, make a new one: ReplaceWithPrefab window = (ReplaceWithPrefab)EditorWindow.GetWindow(typeof(ReplaceWithPrefab)); window.Show(); }
static void ReplaceMenuItem() { // Get existing open window or if none, make a new one: ReplaceWithPrefab window = (ReplaceWithPrefab)GetWindow(typeof(ReplaceWithPrefab)); window.Show(); }
[MenuItem("Tools/Replace with Prefab")] //[MenuItem("Tools/Community/Replace with Prefab")] static void StartWindow() { ReplaceWithPrefab window = (ReplaceWithPrefab)GetWindow(typeof(ReplaceWithPrefab)); window.Show(); window.titleContent = new GUIContent("Replace with Prefab"); window.minSize = window.windowMinSize; window.maxSize = window.windowMaxSize; }