runtimeinitializeonload
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
runtimeinitializeonload [2021/06/22 17:56] – added note about SceneLoad is actually only the first scene which is unmentioned in the unity docs. gwenpri.me | runtimeinitializeonload [2025/01/15 04:35] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 16: | Line 16: | ||
* 2021.1.12f1 (editor only) | * 2021.1.12f1 (editor only) | ||
- | Methods with RuntimeInitializeLoadType.AfterSceneLoad, | + | Methods with RuntimeInitializeLoadType.AfterSceneLoad, |
- | Tested | + | |
+ | Another important thing is that the method should | ||
+ | ---- | ||
+ | |||
+ | ===== Other Nuanced Info ===== | ||
+ | |||
+ | If you create a GameObject and attach a MonoBehaviour | ||
+ | |||
+ | Example: | ||
+ | <code cs> | ||
+ | [RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.BeforeSceneLoad)] | ||
+ | static void AutoRun() { | ||
+ | GameObject obj = new GameObject(" | ||
+ | } | ||
+ | </ | ||
+ | ---- | ||
+ | |||
+ | [[https:// |
runtimeinitializeonload.1624384574.txt.gz · Last modified: 2025/01/15 04:35 (external edit)