It seems to me that all the code you do has to be applied to a game object,
which to me - if anyones familiar with flash here, that all code has to be on a movieclip’s. In flash I do most of the coding on a Frame script, which would translate to having code thats executed on the start of a scene in unity.
Is there anyway to just have code executed when the scene is loaded - that is not attached to anything?
Just thinking off the top of my head here (been in Flash development for a long time but just doing the Eval of Unity right now), but you could also start some kind of system timer perhaps and have that trigger timed events, so you could have a psuedo Flash timeline during some parts of gameplay.
Some scripts are directly linked to the parent GameObject, and are therefore attatched to it. Some just need to be somewhere in the scene(yes attatched to an empty GO). These are sometimes called managers.
Yes. For inexperienced programmers, scripts like
var rocket : GameObject;
function Start(){
yield WaitForSeconds(5);
rocket.animation.Play();
}
are fantastic for just making things"happen"; Set up a few of these and it starts to come to life by itself, so if your an artist, your"in there" which is better than “missing out altogether on GameMaking”
“Thanks Unity”
“”
The upper/lower case of that one might not be perfect but you get the idea.
AC