ابدأ بالتواصل مع الأشخاص وتبادل معارفك المهنية

أنشئ حسابًا أو سجّل الدخول للانضمام إلى مجتمعك المهني.

متابعة

Unity difference between start and awake?

user-image
تم إضافة السؤال من قبل Ubaid Zahoor , Backend Developer , Tremau
تاريخ النشر: 2017/11/06
Ahmed Himmow
من قبل 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.

مستخدم محذوف‎
من قبل مستخدم محذوف‎

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

المزيد من الأسئلة المماثلة