void InstanceSceneManager() { if (instance != null) { DestroyImmediate(this); } else { instance = this; } }
// UNITY HOOKS void Awake() { if (instance == null) { instance = this; } else { Destroy(gameObject); } var mazeGen = new MazeGeneratorService(); this.mazeModel = mazeGen.GenerateMaze(11, 11); }