- Notifications
You must be signed in to change notification settings - Fork69
Commit27282b4
committed
Fixed the existing instance being deleted in Awake
Replaced `else` with `else if (instance != this)` as a condition for theinstance to be deleted in Awake.This fixes a really weird bug where if singleton was used in the editorand then again in play mode, it would delete the original instance andcreate a new one.Closes#211 parent9416bf6 commit27282b4
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
Comments
(0)