Show an inactive Gamobject by button

Please look at this page for how to insert code nicely into the forums: Using code tags properly

Once your game object is active, you cannot use the ‘v’ key to activate it again because the update function won’t be running on that game object.
With a button, you can target a method in the OnClick unity event that would do the equivilent of your GetKeyDown for KeyCode.V :slight_smile: In fact, if you made the method inside that script, you could then call it for the keydown (replace), as well as the OnClick of the button :wink:
Unless you didn’t want to do the other lines of code at the same time, then you could just assign the game object to the OnClick UnityEvent and without any code, just choose ‘game object’ in the drop down menu and the set active bool that’s in the list :slight_smile: