- Home /
What's the difference between gameObject and GameObject?
I dont get the difference between those two ...? in Unity.
Could you tell me what the difference between those two is?
Answer by skovacs1 · Nov 01, 2010 at 06:43 PM
GameObject is a type of object and acts as a base class for most Unity entities. It refers to the GameObject stored by unity which holds all Component data related to a GameObject (such as the Transform), the name and various other things.
gameObject is a local variable of type GameObject which is inherited from Component. It allows one to access the instance of the GameObject to which this component is attached.
gameObject
is in most cases functionally the same as
GetComponent("GameObject") as GameObject
Except GameObject isn't a Component, and GetComponent won't work with it
I'd of thought these fairly big "except's". Is there any chance you could layout all this properly and clearly, ie. NOT the way the Unity "manual and reference" files do?
Your answer
![](https://koobas.hobune.stream/wayback/20220613081558im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Setting Scroll View Width GUILayout 1 Answer
Can someone help me fix my Javascript for Flickering Light? 6 Answers
opening a webpage? 1 Answer
Quick Question About UnityScript 4 Answers
FPS keep a loadout 0 Answers