//コルーチンでコメントをチェックする。 private IEnumerator commentChecker(JSON.CommentInfo _commentInfo) { var comment = _commentInfo.Message; var isSuperChat = false; if (isDebug) { Debug.Log("check:" + comment); } if (isUseChannelInfo) { YouTubeChannelInfoCheck.Instance.channelCheck(_commentInfo.AuthorId); } if (YouTubeCommentType.isSuperChat(_commentInfo.Type)) { superChatAction.superChatAction(); isSuperChat = true; } for (int i = 0; i < commentActionSettings.Count; i++) { string _target = commentActionSettings[i].targetComment; if (comment.Contains(_target)) { commentActionSettings[i]._commentAction.applyCommentAction(comment, _target, isSuperChat); yield break; } } yield break; }
//コメントチェックのコルーチンを実行する internal void startCommentCheck(JSON.CommentInfo youtubeCommentInfo) { StartCoroutine(commentChecker(youtubeCommentInfo)); }