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

Pubblicato il: 08 gennaio 2023
sul canale di: 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.


In questa pagina del sito puoi guardare il video online Hide Game Object Using C# in Unity _ SetActive VS Renderer.enabled della durata di ore minuti seconda in buona qualità , che l'utente ha caricato DA LAB 08 gennaio 2023, condividi il link con amici e conoscenti, su youtube questo video è già stato visto 853 volte e gli è piaciuto 11 spettatori. Buona visione!