private void Awake() { Debug.Assert(_singleton == null, "Attempting to create multiple instances of TwitchChatter.TwitchChatClient! Only one instance can exist at any time."); _singleton = this; _internalClient = TwitchChatClientInternal.singleton; _internalClient.Awake(); if (_autoJoinChannels != null && _autoJoinChannels.Length > 0) { foreach (string channelName in _autoJoinChannels) { JoinChannel(channelName); } } if (_autoEnableWhispers && !string.IsNullOrEmpty(_userName) && !string.IsNullOrEmpty(_oAuthPassword)) { EnableWhispers(); } //_internalClient.printVerboseDebugInfo = true; }
private void OnDestroy() { if (_internalClient != null) { _internalClient.OnDestroy(); _internalClient = null; } _singleton = null; }