IEnumerator Tweet(string message) { tweet_state = TweetStateCode.Begin; int handle = TweetMediaPlugin.tmTweetAsync(m_ctx, message); while (enabled) { TweetMediaPlugin.tmTweetState state = TweetMediaPlugin.tmGetTweetState(m_ctx, handle); if (state.code == TweetMediaPlugin.tmEStatusCode.InProgress) { yield return(0); } else { if (state.code == TweetMediaPlugin.tmEStatusCode.Succeeded) { tweet_state = TweetStateCode.Succeeded; } else { m_error_message = state.error_message; tweet_state = TweetStateCode.Failed; } TweetMediaPlugin.tmReleaseTweetCache(m_ctx, handle); break; } } }
IEnumerator Tweet(string message) { tweet_state = TweetStateCode.Begin; int handle = TweetMediaPlugin.tmTweetAsync(m_ctx, message); while (enabled) { TweetMediaPlugin.tmTweetState state = TweetMediaPlugin.tmGetTweetState(m_ctx, handle); if (state.code == TweetMediaPlugin.tmEStatusCode.InProgress) { yield return 0; } else { if (state.code == TweetMediaPlugin.tmEStatusCode.Succeeded) { tweet_state = TweetStateCode.Succeeded; } else { m_error_message = state.error_message; tweet_state = TweetStateCode.Failed; } TweetMediaPlugin.tmReleaseTweetCache(m_ctx, handle); break; } } }