클래스 썸네일형 리스트형 유니티3D 싱글톤 구현 방법 public class SingletonMonoBehaviour : MonoBehaviour where T : SingletonMonoBehaviour{ private static T m_instance; public static T instance { get { if (m_instance == null) { //find existing instance m_instance = GameObject.FindObjectOfType(); if (m_instance == null) { //create new instance GameObject go = new GameObject(typeof(T).Name); m_instance = go.AddComponent(); m_instance.transform.SetPar.. 더보기 이전 1 다음