From 7f1913677d73bc96b0a1bac649b3518e95d0fdbf Mon Sep 17 00:00:00 2001
From: miepzerino <o.skotnik@gmail.com>
Date: Wed, 02 Apr 2025 17:05:30 +0000
Subject: [PATCH] #41 changed ground layer to start at y=-1

---
 Assets/Scripts/Managers/SoundManager.cs |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/Assets/Scripts/Managers/SoundManager.cs b/Assets/Scripts/Managers/SoundManager.cs
index e4f61a9..b9e484a 100644
--- a/Assets/Scripts/Managers/SoundManager.cs
+++ b/Assets/Scripts/Managers/SoundManager.cs
@@ -1,4 +1,5 @@
 using Assets.Scripts.Enums;
+using Assets.Scripts.Helpers;
 using System.Collections;
 using System.Collections.Generic;
 using UnityEngine;
@@ -74,10 +75,13 @@
             Debug.Log("More than one SoundManager in the Scene.");
             if (instance != this)
             {
-                GameObject gameObjectToDelete = SoundManager.instance.gameObject;
-                instance = this;
+                //GameObject gameObjectToDelete = SoundManager.instance.gameObject;
+                //instance = this;
+                //Debug.Log("deleted wrong soundManager");
+                //Destroy(gameObjectToDelete);
                 Debug.Log("deleted wrong soundManager");
-                Destroy(gameObjectToDelete);
+                Destroy(this.gameObject);
+                return;
             }
         }
         else

--
Gitblit v1.9.3