Beispiel #1
0
        public static void InitSDK()
        {
            if (m_IsInitialized || (string.IsNullOrWhiteSpace(Key) || string.IsNullOrWhiteSpace(Secret) || string.IsNullOrWhiteSpace(Config)))
            {
                return;
            }

            ChirpPlugin.InitSDK(Key, Secret, Config);
            m_IsInitialized = true;
        }
Beispiel #2
0
    public void ChirpInitSDK()
    {
        HideErrorMessage();
        ChirpPlugin.OnSentDataEvent        -= ChirpPlugin_OnSentDataEvent;
        ChirpPlugin.OnRecieveDataEvent     -= ChirpPlugin_OnRecieveDataEvent;
        ChirpPlugin.OnChangeStateDataEvent -= ChirpPlugin_OnChangeStateDataEvent;

        try {
            ChirpPlugin.InitSDK(Key, Secret, Config);
        } catch (System.Exception ex) {
            ErrorText.text = ex.Message;
            return;
        }

        ChirpPlugin.OnSentDataEvent        += ChirpPlugin_OnSentDataEvent;
        ChirpPlugin.OnRecieveDataEvent     += ChirpPlugin_OnRecieveDataEvent;
        ChirpPlugin.OnChangeStateDataEvent += ChirpPlugin_OnChangeStateDataEvent;
        InitButton.interactable             = false;
        StartButton.interactable            = true;
    }