void Awake() { if (instance != null) { Destroy(gameObject); } else { instance = this; DontDestroyOnLoad(gameObject); } PubSubServerInstance.Subscribe(typeof(SuccessMessage), OnSuccess); PubSubServerInstance.Subscribe(typeof(FailureMessage), OnFailure); }
private void Awake() { if (instance != null) { Destroy(gameObject); } else { instance = this; DontDestroyOnLoad(gameObject); } PubSubServerInstance.Subscribe(typeof(StartGameMessage), OnStartGame); PubSubServerInstance.Subscribe(typeof(SuccessMessage), OnSuccess); PubSubServerInstance.Subscribe(typeof(FailureMessage), OnFailure); Debug.Log("IN AWAKE OF SCENE MANAGER"); }