Assets.Scripts.MonoSingleton.Awake C# (CSharp) Method

Awake() private method

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