Uninomicon

Documenting the dark corners of the Unity Engine.

User Tools

Site Tools


talk:runtimeinitializeonload

Seems like RuntimeInitializeOnLoadMethod and InitializeOnLoadMethod act differently on editor if Domain Reload is disabled.

Method with RuntimeInitializeOnLoadMethod called while entering PlayMode.

Method with InitializeOnLoadMethod called only on compilation.

For example if one needs to append to PlayerLoop on editor context, it should be done in method with InitializeOnLoadMethod. But for builds it should be RuntimeInitializeOnLoadMethod. Those two will collide in editor context. (alpdogan)

talk/runtimeinitializeonload.txt · Last modified: 2022/02/11 07:51 by alpdogan