void Awake() { if (instance == null) { instance = this; } else { Debug.LogError("multiple instances of WebsocketMessageQueue!!!"); Destroy(gameObject); } }
void Start() { messageQueue = WebsocketMessageQueue.instance; messageQueue.AddHandler(Topics.ClientRegistration, OnRegisterClient); }