Hide Game Object Using C# in Unity _ SetActive VS Renderer.enabled

Publicado em: 08 Janeiro 2023
no canal de: DA LAB
853
11

Both SetActive and Renderer.enabled can be used to make a game object invisible, but there is a significant difference between them that this video highlights.

GameObject.SetActive activates or Deactivates a Game Object. When disabling a game object, each of its components, including attached renderers, colliders, rigidbodies, and scripts, will be disabled. Unity will no longer call the Update() method of a script attached to the deactivated Game Object.

Renderer.enabled makes the rendered 3D Game Object visible or invisible. When disabling a Game Object renderer, its components, including attached renderers, colliders, rigidbodies, and scripts, will stay enabled. Unity will call the Update() method of a script attached to the Game Object.


Nesta página do site você pode assistir ao vídeo on-line Hide Game Object Using C# in Unity _ SetActive VS Renderer.enabled duração hora minuto segundo em boa qualidade , que foi baixado pelo usuário DA LAB 08 Janeiro 2023, compartilhe o link com seus amigos e conhecidos, no youtube este vídeo já foi visto 853 vezes e gostou 11 espectadores. Boa visualização!