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