TURN GameObject ON and OFF through script in Unity, ACTIVATE and DEACTIVATE GameObject through code
Channel: GameDevTraum in Spanish
Date: 21/11/2020

When a GameObject is active in the hierarchy and the game is running, Unity updates periodically each of its components and executes some other functions on them, all this in an automatic way. If we deactivate the GameObject, this process will not take place and we will achieve the effect that the GameObject disappears from the scene.
In this video we are going to see how to activate and deactivate GameObjects in Unity through code. To do this we will create a Script that has a reference of the GameObject we want to activate or deactivate and we will use the SetActive() function, passing as a parameter "false" to deactivate the GameObject and "true" to activate it.

____________________________________________________________
*LINKS*

*Portfolio:* https://gamedevtraum.com/en/portfolio-en/

*LinkedIn:* https://www.linkedin.com/in/gamedevtraum/

*Downloads:* https://gamedevtraum.itch.io/

*Contact:* https://www.instagram.com/gamedevtraum/
____________________________________________________________

#EN