fix: Make sure that we don't reference a deleted object

This commit is contained in:
Nicholas Novak
2023-05-05 00:42:40 -07:00
parent cd7195ffd1
commit 14fe75dd44
+1
View File
@@ -19,6 +19,7 @@ public class SceneController : MonoBehaviour
else else
{ {
Destroy(this); Destroy(this);
return;
} }
// Make this object stay around when switching scenes // Make this object stay around when switching scenes
DontDestroyOnLoad(this.gameObject); DontDestroyOnLoad(this.gameObject);