- Home /
A way to know if unity was just opened? [ExecuteInEditMode]
I have some [ExecuteInEditMode] scripts that executes when a specific object is added to the scene. The Init() function which is called in OnEnable() should be called when the object is created and after exiting play mode which it does. But for some reason it is called multiple times when i open Unity. Is there a way to know if unity was just opened?
Your answer
Follow this Question
Related Questions
Execution Order of Scripts - Awake and OnEnable 1 Answer
Gameobject's Script component doesn't start IEnumerator, nor InvokeRepeating when activated... Why? 1 Answer
Prevent ExecuteInEditMode scripts to call Awake OnEnable Start after compiling and game exit 1 Answer
ExecuteInEditMode not working in some scripts 1 Answer
OnEnable not called after all Awake and not all OnDisable before OnDestroy? 1 Answer