Is there a list of all “reserved variables” such as transform
and rigidbody
?
Also, what happens if there is a variable assignment collision?
Is there a list of all “reserved variables” such as transform
and rigidbody
?
Also, what happens if there is a variable assignment collision?
Yes, you’ll find them in the script reference for ‘MonoBehaviour’. If you assign a variable name on top of an existing one, the one with the smaller ‘scope’ will be used. It will, however, throw a warning because that kind of thing is usually unintended.