I know .transform usage should be cached for optimization. I can get around that by directly storing the Transform of the object so I can just say:
var myObject : Transform;
myObject.position = Vector3.zero;
However, if I also need to access the GameObject (in this case, to set it as active/inactive), does using `myObject.gameObject` also use a hidden GetComponent lookup as .transform does, or is .gameObject a special case?
↧