public void TrySetSingleton() { if (singleton != null && singleton != this) { Debug.LogError("Free-roaming menu singleton already set. Destroying self."); Destroy(this); } else { singleton = this; } }
public void SetUpListener(FreeRoamMenuController menuController) { freeRoamMenuController = menuController; Button.onClick.AddListener(() => freeRoamMenuController.LaunchMenuScene(menuSceneIdentifier)); }