Uninomicon

Documenting the dark corners of the Unity Engine.

User Tools

Site Tools


runtimeinitializeonload

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
runtimeinitializeonload [2021/04/30 19:38]
gamedevnet
runtimeinitializeonload [2021/06/22 18:16]
uninomiconadmin
Line 3: Line 3:
 The documentation is not correct about this function running after awake. It does by default, but not if you specify a load type: The documentation is not correct about this function running after awake. It does by default, but not if you specify a load type:
  
-The order of callbacks is: ((tested in the editor, 2020.2.1f1. Also tested in editor and in build in 2019.4.12f1))+The order of callbacks is: ((tested in the editor, 2020.2.1f1 and 2020.1.17f1. Also tested in editor and in build in 2019.4.12f1))
   * SubsystemRegistration   * SubsystemRegistration
   * AfterAssembliesLoad   * AfterAssembliesLoad
Line 12: Line 12:
  
 Providing no load type defaults to RuntimeInitializeLoadType.AfterSceneLoad, running the function after Awake. Providing no load type defaults to RuntimeInitializeLoadType.AfterSceneLoad, running the function after Awake.
 +
 +Other versions that have been verified to also use this exact order:
 +  * 2021.1.12f1 (editor only)
 +
 +Methods with RuntimeInitializeLoadType.AfterSceneLoad, or RuntimeInitializeLoadType.BeforeSceneLoad will only be called for the **first** scene in a run of the application, not every scene. ((Tested in Unity 2019.4.19f1, in editor and in Android build))
runtimeinitializeonload.txt ยท Last modified: 2022/01/26 04:23 by 187.190.156.255