Communiquez avec les autres et partagez vos connaissances professionnelles

Inscrivez-vous ou connectez-vous pour rejoindre votre communauté professionnelle.

Suivre

Unity difference between start and awake?

user-image
Question ajoutée par Ubaid Zahoor , Backend Developer , Tremau
Date de publication: 2017/11/06
Ahmed Himmow
par Ahmed Himmow , Unity Game Developer , Sand Forge Games

In the Unity Editor, the two can function similarily, with the exception of Start being called everytime the script is re-enabled. In a published game, Awake would be called whenever a scene is loaded. Start is called at a later stage and only if the script containing the code for it is enabled.I highly recommend checking this page. It should be useful as a reference for how and when event functions, like Awake and Start, work.

Utilisateur supprimé
par Utilisateur supprimé

Start() is called everytime your script is enabled, Awake() is called even if your script is disabled, also Awake() is called before Start() method.

More Questions Like This