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