public void TravelToShopNest() { PlayerController player; if (PlayerController.Instance != null) { player = PlayerController.Instance; } else { player = FindObjectOfType <PlayerController>(); } LocalObjectManager nestManager = FindObjectOfType <LocalObjectManager>(); player.transform.position = nestManager.shopNest.transform.position; HideNestCanvas(); }
// Use this for initialization void Start() { //Since each LocalObjectManager is unique to their scene, the instance should update depending on the scene Instance = this; }