protected override void CheckError(Twitch.ErrorCode err)
 {
     if (err != Twitch.ErrorCode.TTV_EC_SUCCESS)
     {
         Debug.LogError(err.ToString());
     }
 }
Пример #2
0
        protected virtual bool CheckError(Twitch.ErrorCode err)
        {
            if (Error.Failed(err))
            {
                return(false);
            }

            return(true);
        }
        protected override bool CheckError(Twitch.ErrorCode err)
        {
            if (Error.Failed(err))
            {
                Debug.LogError(err.ToString());
                return(false);
            }

            return(true);
        }
Пример #4
0
    protected void HandleLoginAttemptComplete(Twitch.ErrorCode result)
    {
        if (Twitch.Error.Succeeded(result))
        {
            DebugOverlay.Instance.AddViewportText("Logged in, ready to stream", 2);
        }
        else
        {
            PlayerPrefs.DeleteKey(s_TwitchAuthTokenKey);
            PlayerPrefs.Save();

            DebugOverlay.Instance.AddViewportText("AuthToken invalid, please enter your username and password again", 2);
        }
    }
Пример #5
0
    protected void HandleAuthTokenRequestComplete(Twitch.ErrorCode result, AuthToken authToken)
    {
        if (Twitch.Error.Succeeded(result))
        {
            PlayerPrefs.SetString(s_TwitchAuthTokenKey, authToken.Data);
            PlayerPrefs.SetString(s_TwitchUserNameKey, m_BroadcastController.UserName);

            DebugOverlay.Instance.AddViewportText("User authenticated", 2);
        }
        else
        {
            PlayerPrefs.DeleteKey(s_TwitchAuthTokenKey);
            PlayerPrefs.DeleteKey(s_TwitchUserNameKey);

            DebugOverlay.Instance.AddViewportText("Failed to authenticate", 2);
        }

        PlayerPrefs.Save();
    }
Пример #6
0
 protected void HandleGameNameListReceived(Twitch.ErrorCode result, GameInfo[] list)
 {
     // TODO: handle the list of games
 }