How do I control which scripts Start() is called first?
I have a gameobject to which a script is attached. This script’s Start() needs to be called first. All the other scripts are dependent upon it. Currently I am getting many null pointer because the script attached to the car is getting executed first rather than the above mentioned script which is responsible for activating/deactivating cars depending upon user selection/locked,unlocked cars etc…
There is no way. Your best bet is to create a system where you have one game object call an Init() method on your other game objects. That way you can create your own order of initialization. At least in the case of the ones where they are dependent.
The other way would be to manage things between Awake and Start, but having two levels of order when it comes to initialization, may not be enough.
hmm so there is no way to know in advance in which order the scripts will be executed?!
I did the Init() thing you mentioned. Its a slight harakiri on the coding side but working perfectly :P. Thanks man /no1