// Update is called once per frame void Update() { if (startStoreName == true) { if (Input.GetKeyDown(KeyCode.R) && pushInventory.inventory == "") { pushInventory.StoreName(this.name); pushInventory.riddleTablets.Add(this.gameObject); Debug.Log("added to list"); this.gameObject.SetActive(false); startStoreName = false; interactable.enabled = false; } if (Input.GetKeyDown(KeyCode.R) && pushInventory.inventory == "" && insertTest.isPlaced == true) { pushInventory.StoreName(this.name); pushInventory.riddleTablets.Add(this.gameObject); Debug.Log("added to list"); this.gameObject.SetActive(false); Debug.Log("false"); insertTest.isCorrect = 2; insertTest.isPlaced = false; startStoreName = false; } } }