Assets.Scripts.MonoSingleton.Awake C# (CSharp) 메소드

Awake() 개인적인 메소드

private Awake ( ) : void
리턴 void
        void Awake()
        {
            if (instances.GetValueOrDefault(GetType(), null) == null)
            {
                instances.AddOrReplace(GetType(), this);
            }
            else
            {
                Destroy(this.gameObject);
            }
            DontDestroyOnLoad(this.gameObject);
        }
MonoSingleton