EventManager.Awake C# (CSharp) 메소드

Awake() 개인적인 메소드

private Awake ( ) : void
리턴 void
    private void Awake()
    {
        if (!_created && allowSingleton) {
            DontDestroyOnLoad(this);
            instance = this;
            _created = true;
            Setup();
        } else {
            if (allowSingleton) {
                if (EventManager.instance.allowWarningOutputs) {
                    Debug.LogWarning("Only a single instance of " + this.name + " should exists!");
                }
                Destroy(gameObject);
            } else {
                instance = this;
                Setup();
            }
        }
    }