|  |  |  | 
|---|
|  |  |  | using Assets.Scripts.Enums; | 
|---|
|  |  |  | using Assets.Scripts.Helpers; | 
|---|
|  |  |  | using System.Collections; | 
|---|
|  |  |  | using System.Collections.Generic; | 
|---|
|  |  |  | using UnityEngine; | 
|---|
|  |  |  | 
|---|
|  |  |  | 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 | 
|---|