What is the difference between referencing an instantiated GameObject and its .gameObject – i.e.:
Suppose o is:
var o:GameObject = Instantiate(obj,Vector3.zero,Quaternion.identity);
What is the difference between:
DoStuffTo(o);
vs
DoStuffTo(o.gameObject);
gameObject is a property that returns the GameObject reference. Since the variable o is already the GameObject reference, using o.gameObject is redundant - it will return the same value already stored in o.
It would seem they reference the same object. What is interesting is the online docs don’t indicate that GameObject has a gameObject memeber…