diff --git a/Assets/Scripts/SS3D/Core/ApplicationStateSystem.cs b/Assets/Scripts/SS3D/Core/ApplicationStateSystem.cs index 0c5f79da4b..988a8782d6 100644 --- a/Assets/Scripts/SS3D/Core/ApplicationStateSystem.cs +++ b/Assets/Scripts/SS3D/Core/ApplicationStateSystem.cs @@ -69,7 +69,7 @@ private void InitializeDiscordIntegration() } else { - FindObjectOfType().Destroy(); + Destroy(FindObjectOfType()); } } diff --git a/Assets/Scripts/SS3D/Interactions/ClientDelayedInteraction.cs b/Assets/Scripts/SS3D/Interactions/ClientDelayedInteraction.cs index 5b741a792b..5cc1d66f2f 100644 --- a/Assets/Scripts/SS3D/Interactions/ClientDelayedInteraction.cs +++ b/Assets/Scripts/SS3D/Interactions/ClientDelayedInteraction.cs @@ -56,7 +56,7 @@ public bool ClientUpdate(InteractionEvent interactionEvent) /// public void ClientCancel(InteractionEvent interactionEvent) { - _loadingBarInstance.Destroy(); + _loadingBarInstance.Dispose(true); } } } \ No newline at end of file diff --git a/Assets/Scripts/SS3D/Interactions/LoadingBar.cs b/Assets/Scripts/SS3D/Interactions/LoadingBar.cs index 3e274f8ea5..1521e34f6f 100644 --- a/Assets/Scripts/SS3D/Interactions/LoadingBar.cs +++ b/Assets/Scripts/SS3D/Interactions/LoadingBar.cs @@ -44,7 +44,7 @@ private void UpdateLoadingProgressTask() { if (StartTime + Duration < Time.time) { - GameObjectCache.Destroy(); + GameObjectCache.Dispose(true); return; } diff --git a/Assets/Scripts/SS3D/Interactions/UI/InteractionMenuView.cs b/Assets/Scripts/SS3D/Interactions/UI/InteractionMenuView.cs index ef63f60908..0ad4bc555b 100644 --- a/Assets/Scripts/SS3D/Interactions/UI/InteractionMenuView.cs +++ b/Assets/Scripts/SS3D/Interactions/UI/InteractionMenuView.cs @@ -68,7 +68,7 @@ private void Update() if (!hasSelfAsParent) { - gameObject.Destroy(); + gameObject.Dispose(true); } } @@ -92,7 +92,7 @@ private void UpdateInteractions() button.GetComponentInChildren().text = interaction.GetName(Event); button.GetComponent