コード例 #1
0
 public void TrySetSingleton()
 {
     if (singleton != null && singleton != this)
     {
         Debug.LogError("Free-roaming menu singleton already set. Destroying self.");
         Destroy(this);
     }
     else
     {
         singleton = this;
     }
 }
コード例 #2
0
        public void SetUpListener(FreeRoamMenuController menuController)
        {
            freeRoamMenuController = menuController;

            Button.onClick.AddListener(() => freeRoamMenuController.LaunchMenuScene(menuSceneIdentifier));
        }