My biggest, albeit minor, struggle with Unity/C# so far is case sensitivity. I do have coding/scripting experience, but mostly in languages that are not case sensitive, or in which it’s a well-adopted custom to stick to a single case. Almost every time I’ve had a problem with my own code in this course, it’s seemed to be because I’ve got a capital and lower-case mixed up.
So I wondered, could anyone please point me to some explanation to the general case standards used in C# or Unity? It might be that I just don’t know enough of the names of types of things, so a guide would be helpful for me.
For example, in this lecture:
Instantiate(towerPrefab, transform.position, Quaternion.identity);
We’ve got Instantiate with a capital - title case I guess. Built in method though, I can hopefully get that they start with a capital. But then we’ve got the towerPrefab variable we created in Camel Case. Ok so I can sort of follow that built-in methods use title or Pascal case and user-defined items use Camel. But after that, we’ve got ‘transform’ in all lower case, but ‘Quaternion’ is in title/Pascal case. I would have expected them to be the same and if I wasn’t following along I would 100% have put them both the same case so got one of them wrong.
TL;DR on that last bit - in that line ‘transform’ is lower case and ‘Quaternion’ is pascal case - please help me understand why.
Any pointers would be appreciated!