Commit 32400bc
committed
Added [DefaultExecutionOrder(-50)] to MonoSingleton
Afaik, this causes no harm and ensures the singleton functions(such as Awake, Update etc.) are executed before other classes. This can be changed in inherited classes if needed, but in 99% of the cases, I would say that you'd want the singleton to execute first. -50 seemed like a reasonable choice due to certain built in classes utilizing up to -100(e.g. UnityEngine.InputSystem.PlayerInput) and this way we still get plenty of free room around the singleton.1 parent 9416bf6 commit 32400bc
1 file changed
+2
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
| |||
147 | 148 | | |
148 | 149 | | |
149 | 150 | | |
150 | | - | |
| 151 | + | |
0 commit comments