public override void OnEnable() { base.OnEnable(); _sc = ChatCoreInstance.Create(); //_sc.OnLogReceived += _sc_OnLogReceived; _svcs = _sc.RunAllServices(); _svcs.OnJoinChannel += QueueOrSendOnJoinChannel; _svcs.OnTextMessageReceived += QueueOrSendOnTextMessageReceived; _svcs.OnChatCleared += QueueOrSendOnClearChat; _svcs.OnMessageCleared += QueueOrSendOnClearMessage; _svcs.OnChannelResourceDataCached += QueueOrSendOnChannelResourceDataCached; ChatImageProvider.TouchInstance(); Task.Run(HandleOverflowMessageQueue); BSEvents.menuSceneLoadedFresh += BSEvents_menuSceneLoadedFresh; }
private void Awake() { this._chatCoreInstance = ChatCoreInstance.Create(); #if DEBUG this._chatCoreInstance.OnLogReceived += this._sc_OnLogReceived; #endif this._chatServiceMultiplexer = this._chatCoreInstance.RunAllServices(); this._chatServiceMultiplexer.OnJoinChannel += this.QueueOrSendOnJoinChannel; this._chatServiceMultiplexer.OnTextMessageReceived += this.QueueOrSendOnTextMessageReceived; this._chatServiceMultiplexer.OnChatCleared += this.QueueOrSendOnClearChat; this._chatServiceMultiplexer.OnMessageCleared += this.QueueOrSendOnClearMessage; this._chatServiceMultiplexer.OnChannelResourceDataCached += this.QueueOrSendOnChannelResourceDataCached; ChatImageProvider.TouchInstance(); _ = this.HandleOverflowMessageQueue(); BSEvents.lateMenuSceneLoadedFresh += this.BSEvents_menuSceneLoadedFresh; }