public static void Init(GameObject sltObj=null) { // Get existing open window or if none, make a new one: window = (CollectibleSpawnerEditorWindow)EditorWindow.GetWindow(typeof (CollectibleSpawnerEditorWindow), false, "Collectible Spawner Editor"); window.minSize=new Vector2(400, 300); //window.maxSize=new Vector2(375, 800); LoadDB(); window.SetupCallback(); GetAllSpawnerInScene(); if(sltObj!=null){ Selection.activeGameObject=sltObj; window.selectObj=null; window.OnSelectionChange(); } }
public static void Init(GameObject sltObj = null) { // Get existing open window or if none, make a new one: window = (CollectibleSpawnerEditorWindow)EditorWindow.GetWindow(typeof(CollectibleSpawnerEditorWindow), false, "Collectible Spawner Editor"); window.minSize = new Vector2(400, 300); //window.maxSize=new Vector2(375, 800); LoadDB(); window.SetupCallback(); GetAllSpawnerInScene(); if (sltObj != null) { Selection.activeGameObject = sltObj; window.selectObj = null; window.OnSelectionChange(); } }