Semantics: object vs game object

Hi,

In Unity semantics matter so I need some clarification. In this tutorial, we are being asked to create a reference to the relevant object that will give us access to FOV. For this, in the script, we create a reference variable of type camera and drag and drop the MainCamera game object onto the corresponding slot in the hierarchy. We drag and drop a game object, but is this game object considered an object as well? Or would it be that the mentioned object is the camera component attached to the MainCamera gameobject?
Thank you for your help.

Object is a C# concept. It is a basic building blocks of the language. Object doesn’t do much and doesn’t have much code. It’s a starting point.

GameObject is a far more complex beast created by Unity. It inherits from other classes, meaning it contains their code and builds on it. A GameObject contains a whole bunch of Unity-specific code and functions, and contains information for Unity meta-data and the ability to use components. It is included in Monobehaviour.

Way back in the chain of inheritance, Unity’s GameObjects inherit from Object, meaning a GameObject is also an Object. (I think everything in C# inherits from Object, but not 100% certain.)

2 Likes

Thanks Anthony for your help.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms