miepzerino
2023-12-23 fe3c8a5515acdfcc50913d5b83de8f9504e95b73
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