Game Development Reference
In-Depth Information
Unity handles scripts like other components we've seen so far, such as Renderer and Trans-
form . Therefore, the scripts are not active unless they are added to game objects. Scripts
must inherit from MonoBehavior class in order to be recognized by Unity as components.
If you don't have much experience in object- oriented programming, you might not be
sure what does inheritance mean in this context. But that's fine, since all you need is to
keep the structure of the default template. Next step is to add our newly created script
to the camera. Once we do this, all behavior we code in the script applies to the camera
game object.
Search WWH ::




Custom Search