How Add component using script in Unity

Publié le: 27 mai 2022
sur la chaîne: VionixStudio
4,999
23

Unity works based on a component system. Every Gameobject’s characteristics are defined by the components added to it. For example, the position is defined by the transform component and the collision is defined by the collider component. This component-based system requires a constant addition or removal of components to alter the behavior of the Gameobjects. In this tutorial, we will see how to add a new component to a Gameobject and also how to access and modify the existing components.
Adding component to a Gameobject during gameplay is not the right way to manage your code, adding a new component takes up a lot of memory and if you frequently add or remove a component from a Gameobject during gameplay, there will be performance issues. We will discuss on how to to efficiently work with components in the later part of this tutorial.

Read more on https://vionixstudio.com/2021/09/22/u...


Sur cette page du site, vous pouvez voir la vidéo en ligne How Add component using script in Unity durée heure minute seconde en bonne qualité , qui a été Téléchargé par l'utilisateur VionixStudio 27 mai 2022, Partagez le lien avec vos amis et connaissances, sur youtube cette vidéo a déjà été regardée 4,999 fois et il a aimé 23 téléspectateurs. Bon visionnage!