Project Update #1: Learning Unity


For our project I’ve been learning how scenes work in Unity. Unity is best known as an engine and editor for creating video games however, it is also used for some 3D animation and simulation.

Unity projects consist of one or more scenes where all the content is placed. Nearly everything in a scene from interactable items to light sources to the camera is a GameObject. GameObjects have Components which give them properties. For example, all GameObjects have a Transform component which gives them position, rotation, and scale components. There are many different types of Components that cover elements such as light, audio, mesh, physics and more.

A GameObject with a set of Components and all its children can be saved as a PreFab asset. From this, you can create as many instances of the object with all its Components and properties as you need.

It is very easy to see the connection between how objects work in Unity and object oriented programming concepts such as classes and inheritance. GameObject is a base class that everything else inherits from and user created objects can inherit from each other. The Unity Editor provides a window to show these relationships in a scene.

Since learning about this, I’ve been looking at games I play and trying to guess what might be considered a scene and identify what objects make it up and what their Components might be. For example, a breakable wall might actually be two separate objects: the initial wall and the debris left after it’s broken. The initial wall might have some physics component that prevents another object, like a character, from passing through, while the debris does not. 

Another thing that I have learned is that most things you can do in the Unity Editor, such as creating and placing objects, can also be done through a script thanks to the Unity API. This will be key for our project, which aims to simplify creating a VR scene by allowing the user to create a scene from a text file.

Print Friendly, PDF & Email

Leave a Reply

Your email address will not be published. Required fields are marked *