-
Notifications
You must be signed in to change notification settings - Fork 69
Commit 27282b4
Fixed the existing instance being deleted in Awake
Replaced `else` with `else if (instance != this)` as a condition for the
instance to be deleted in Awake.
This fixes a really weird bug where if singleton was used in the editor
and then again in play mode, it would delete the original instance and
create a new one.
Closes #21 1 parent 9416bf6 commit 27282b4
1 file changed
+2
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
75 | - | ||
75 | + | ||
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
| |||
147 | 147 | | |
148 | 148 | | |
149 | 149 | | |
150 | - | ||
150 | + | ||
0 commit comments