public void ForceAddToInventory(modularPlayerControllerVR player) { if (!alreadyInInventory) { Debug.Log("Should add to inventory"); player.GetComponent <PlayerInventory>().AddItemToInventory(this.objInventoryItem); alreadyInInventory = true; gameObject.transform.position = FindObjectOfType <DoorGoal>().transform.position; gameObject.SetActive(false); } }
private void Start() { Player = FindObjectOfType <modularPlayerControllerVR>(); }