Introduction to scripting in Unity

In this section, our goal is to understand how Unity scripts integrate as components on top of GameObjects. If you recall from Chapter 1, Introducing Game Audio in Unity, all the functionality built into Unity is in the form of components and components are just scripts and code. Take a look at the following diagram, which should demonstrate the basic concepts of a GameObject and Component:

A simplistic view of how components combine to create various game objects

As the diagram shows, all objects are derived from GameObject, which means, they all essentially share the same base level object. If you look ...

Get Game Audio Development with Unity 5.X now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.