Hi guys! Great course, I am having a lot of fun playing with unity. Just as a short background I am JavaScript developer on a daily basis and I decided to write all the stuff with C# (which I don’t know) just to take a break from JS.
What I find I little bit confusing is a lot of variables which are inherited/exposed from some of the upperscope classes/global vars. As far as I understand most of them are Unity specific. My question is what is the difference between those:
this.transform.foo
gameObject.transform.foo
transform.foo
Are this
and gameObject
references to the same thing (which would be an instance of current class)? If not what is the difference between them and to which one I am referencing when I skip this/gameObject
completely?
Hopefully that’s comprohensible question. I was looking into docs but perhaps I have overlooked answer to this question. If someone could point me to the correct place in docs or answer shortly, that’d be great.
I know it perhaps deasn’t really matter at this point of the course, I am just curious
Thanks in advance.
Ps I’ll post my pimped version of Block Breaker here soon