I know this question sounds weird, but what is a Script?
Normaly I would think that it's its own category. But if a Script were its own category, its own ObjectOrientedProgramming-Concept in itself, why don't you see it described in any OOP-Primer or on the Wikipedia-page ( http://en.wikipedia.org/wiki/Object-oriented_programming )?
And I get the feeling, that a Script in the ProjectPane is something different than a Script attatched to a GameObject.
In the ProjectPane the Script usually defines one class, but it isn't really a class itself, is it?
Because it also might define several classes (see this related question: http://answers.unity3d.com/questions/2006/does-unity-support-the-declaration-of-several-classes-in-one-script ) and the script can’t be several classes at the same time…?
But it isn’t an object either, as it has no state.
When it's attatched to a GameObject, however, it does have a state.
So that would mean it’s an object, right?
Or does it have a state, really? Maybe it’s only the GameObject that stores the state and the script doesn’t even know about it???
Either way, what puzzles me about this is, when you search via FindObjectOfType, you will not get the Script but the GameObject the Script is attatched to. So it apears the script only adds something to an existing object instead of being one itself.
Or is this just a shortcut the FindObjectOfType-Function will automatically provide for some reason?
So maybe it is something completely different?
Can I imagine it as the sheet of paper on which the blueprint for my object is written on, wich is neither the blueprint itself, nor the object that would be produced from the blueprint, but still can be altered by drawing on it?
Or maybe like sort of a HelperObject. That can’t do much by itself but only when attatched to something, while at the same time changes the functionality of the thing it got attatched to. Kind of like a Gun won’t do anything by itself, but when given to a man the man becomes a gunner and the gun becomes a deadly weapon.
Thanks & Greetz, Ky.