Beispiel #1
0
    // Token: 0x0600517B RID: 20859 RVA: 0x001BE994 File Offset: 0x001BCD94
    private void SendHmdAnalytic()
    {
        string analyticName = "hmdType";
        string value        = "none";
        string value2       = "none";
        string value3       = "steam";

        if (HMDManager.IsHmdDetected())
        {
            if (SteamVR.instance.hmd_TrackingSystemName == "oculus")
            {
                value = "oculus";
            }
            else
            {
                value = "vive";
            }
        }
        switch (VRCInputManager.GetLastUsedInputMethod())
        {
        case VRCInputMethod.Keyboard:
            value2 = "keyboard";
            break;

        case VRCInputMethod.Mouse:
            value2 = "keyboard";
            break;

        case VRCInputMethod.Controller:
            value2 = "controller";
            break;

        case VRCInputMethod.Vive:
            value2 = "hand";
            break;

        case VRCInputMethod.Oculus:
            value2 = "hand";
            break;
        }
        Dictionary <string, object> dictionary = new Dictionary <string, object>();

        dictionary["deviceId"]     = ApiModel.DeviceID;
        dictionary["buildType"]    = value3;
        dictionary["hmdType"]      = value;
        dictionary["inputType"]    = value2;
        dictionary["platform"]     = Application.platform.ToString();
        dictionary["store"]        = VRCApplicationSetup.GetBuildStoreID();
        dictionary["buildVersion"] = VRCApplicationSetup.GetBuildVersionString();
        Debug.Log("Sending deviceInfo analytic: " + string.Join(", ", (from kvp in dictionary
                                                                       select kvp.Key + " = " + kvp.Value).ToArray <string>()));
        base.StartCoroutine(this.SendUnityHmdAnalytic(analyticName, dictionary));
        global::Analytics.Send(ApiAnalyticEvent.EventType.deviceInfo, dictionary, null, null);
    }
Beispiel #2
0
 // Token: 0x0600517A RID: 20858 RVA: 0x001BE92C File Offset: 0x001BCD2C
 private void AttemptToSendHmdAnalytic()
 {
     if (VRCInputManager.GetLastUsedInputMethod() != VRCInputMethod.Count)
     {
         if (!this.hasSentLoggedInHmdAnalytics && APIUser.IsLoggedIn)
         {
             this.SendHmdAnalytic();
             this.hasSentLoggedInHmdAnalytics  = true;
             this.hasSentAnonymousHmdAnalytics = true;
         }
         if (!this.hasSentAnonymousHmdAnalytics && VRCFlowManager.Instance.HasAttemptedCachedLogin)
         {
             this.SendHmdAnalytic();
             this.hasSentAnonymousHmdAnalytics = true;
         }
     }
 }