void checkForChangedObjects() { //needed when changing scene to have the new dialogue manager etc if (inventory == null) { inventory = GameObject.FindGameObjectWithTag("Inventory").GetComponent <OldInventory>(); } }
protected override void doStart() { if (inventory == null) { inventory = GameObject.FindGameObjectWithTag("Inventory").GetComponent <OldInventory>(); } //check if object already picked up if (inventory.hasBeenPickedUp(gameObject.name)) { Destroy(gameObject); } }