Controlling GameObjects using components
In the Unity Editor, you make changes to Component properties using
the
Inspector. So, for example, changes to the position values of the
Transform Component will result in a change to the GameObject’s
position. Similarly, you can change the color of a Renderer’s material
or the mass of a Rigidbody with a corresponding effect on the appearance
or behavior of the GameObject. For the most part, scripting is also
about modifying Component properties to manipulate GameObjects. The
difference, though, is that a script can vary a property’s value
gradually over time or in response to input from the user. By changing,
creating and destroying objects at the right time, any kind of gameplay
can be implemented.
https://docs.unity3d.com/Manual/ControllingGameObjectsComponents.html
No comments:
Post a Comment