Files
Genesis_Unity/Assets/02_Scripts/Managers/Global/SoundManager.cs

18 lines
389 B
C#

using UnityEngine;
public class SoundManager : MonoBehaviour
{
public static SoundManager Instance;
private void Awake()
{
if (Instance == null)
{
Instance = this; //만들어진 자신을 인스턴스로 설정
}
else
{
Destroy(gameObject); //이미 인스턴스가 있으면 자신을 파괴
}
}
}