From 14fe75dd44c58a59f283560c09c4d34c779ab95d Mon Sep 17 00:00:00 2001 From: Nicholas Novak <34256932+NickyBoy89@users.noreply.github.com> Date: Thu, 4 May 2023 22:23:51 -0700 Subject: [PATCH] fix: Make sure that we don't reference a deleted object --- Assets/Scripts/SceneController.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/Assets/Scripts/SceneController.cs b/Assets/Scripts/SceneController.cs index 7c9d8bf..6223709 100644 --- a/Assets/Scripts/SceneController.cs +++ b/Assets/Scripts/SceneController.cs @@ -19,6 +19,7 @@ public class SceneController : MonoBehaviour else { Destroy(this); + return; } // Make this object stay around when switching scenes DontDestroyOnLoad(this.gameObject);