Hi all,
before I continue my course I would like to understand everything I have seen so far. There is this one line of code, that I don’t understand from the synthax point of view. I fully understand it’s function and need though, but I only have beginner knowledge in C# and in that case it does not make much sense.
In “Loose Collider” script for the ball, we have added this line :
public LevelManager levelManager;
I get it, that we are making the LevelManager-Script accessable from within the LooseCollider-Script, but in c# terms, what is this ?
Are we creating a new class here, or a variable called LevelManager and then assign it a internal variable called “levelManager” ? Or is this just a C# way to activate other scripts within the current script ?
Also, what jumped me, we are calling the variable “levelManager” within the looseCollider-Script, to access the LevelManager-Script. That’s fine. But why is it, that in Unity GUI itself in the inspector of the Loose Collider Script now the variable appears as “Level Manager”… I have nowhere written it with a space, where does this come from ? It easy to follow in this simple example, but in more complex projects this behaviour could be misleading. Where does it come from ?
Thanks for explaining
B/R
Michael