void CheckUpdateEvent()
    {
        if (!sendRawEnable && (UpdateRawdataEvent != null))
        {
            sendRawEnable = true;
            UnityThinkGear.SetSendRawEnable(true);
        }
        if (sendRawEnable && UpdateRawdataEvent == null)
        {
            sendRawEnable = false;
            UnityThinkGear.SetSendRawEnable(false);
        }

        if (!sendEEGEnable &&
            (UpdateDeltaEvent != null || UpdateThetaEvent != null ||
             UpdateLowAlphaEvent != null || UpdateLowBetaEvent != null ||
             UpdateLowGammaEvent != null || UpdateHighAlphaEvent != null ||
             UpdateHighBetaEvent != null || UpdateHighGammaEvent != null))
        {
            sendEEGEnable = true;
            UnityThinkGear.SetSendEEGEnable(true);
        }
        if (sendEEGEnable &&
            UpdateDeltaEvent == null && UpdateThetaEvent == null &&
            UpdateLowAlphaEvent == null && UpdateLowBetaEvent == null &&
            UpdateLowGammaEvent == null && UpdateHighAlphaEvent == null &&
            UpdateHighBetaEvent == null && UpdateHighGammaEvent == null)
        {
            sendEEGEnable = false;
            UnityThinkGear.SetSendEEGEnable(false);
        }

        if (!sendESenseEnable &&
            (UpdateAttentionEvent != null || UpdateMeditationEvent != null))
        {
            sendESenseEnable = true;
            UnityThinkGear.SetSendESenseEnable(true);
        }
        if (sendESenseEnable &&
            UpdateAttentionEvent == null && UpdateMeditationEvent == null)
        {
            sendESenseEnable = false;
            UnityThinkGear.SetSendESenseEnable(false);
        }

        if (!sendBlinkEnable && (UpdateBlinkEvent != null))
        {
            sendBlinkEnable = true;
            UnityThinkGear.SetSendBlinkEnable(true);
        }
        if (sendBlinkEnable && UpdateBlinkEvent == null)
        {
            sendBlinkEnable = false;
            UnityThinkGear.SetSendBlinkEnable(false);
        }
    }
    IEnumerator CheckUpdateCoroutine()
    {
        while (checkUpdate)
        {
            if (!sendRawEnable && (UpdateRawdataEvent != null))
            {
                sendRawEnable = true;
                UnityThinkGear.SetSendRawEnable(sendRawEnable);
            }

            if (sendRawEnable && UpdateRawdataEvent == null)
            {
                sendRawEnable = false;
                UnityThinkGear.SetSendRawEnable(sendRawEnable);
            }

            if (!sendEEGEnable &&
                (UpdateDeltaEvent != null || UpdateThetaEvent != null ||
                 UpdateLowAlphaEvent != null || UpdateLowBetaEvent != null ||
                 UpdateLowGammaEvent != null || UpdateHighAlphaEvent != null ||
                 UpdateHighBetaEvent != null || UpdateHighGammaEvent != null))
            {
                sendEEGEnable = true;
                UnityThinkGear.SetSendEEGEnable(sendEEGEnable);
            }

            if (sendEEGEnable &&
                UpdateDeltaEvent == null && UpdateThetaEvent == null &&
                UpdateLowAlphaEvent == null && UpdateLowBetaEvent == null &&
                UpdateLowGammaEvent == null && UpdateHighAlphaEvent == null &&
                UpdateHighBetaEvent == null && UpdateHighGammaEvent == null)
            {
                sendEEGEnable = false;
                UnityThinkGear.SetSendEEGEnable(sendEEGEnable);
            }

            if (!sendESenseEnable && (UpdateAttentionEvent != null || UpdateMeditationEvent != null))
            {
                sendESenseEnable = true;
                UnityThinkGear.SetSendESenseEnable(sendESenseEnable);
            }

            if (sendESenseEnable && UpdateAttentionEvent == null && UpdateMeditationEvent == null)
            {
                sendESenseEnable = false;
                UnityThinkGear.SetSendESenseEnable(sendESenseEnable);
            }

            if (!sendBlinkEnable && (UpdateBlinkEvent != null))
            {
                sendBlinkEnable = true;
                UnityThinkGear.SetSendBlinkEnable(sendBlinkEnable);
            }

            if (sendBlinkEnable && UpdateBlinkEvent == null)
            {
                sendBlinkEnable = false;
                UnityThinkGear.SetSendBlinkEnable(sendBlinkEnable);
            }

            yield return(new WaitForSeconds(1f));
        }
    }