You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
896 B
33 lines
896 B
#if (UNITY_5_6_OR_NEWER && !UNITY_5_6_0) |
|
|
|
using UnityEditor; |
|
using UnityEngine.Networking; |
|
|
|
namespace UnityEngine.UDP.Editor.Analytics |
|
{ |
|
[InitializeOnLoad] |
|
public static class SdkImportEvent |
|
{ |
|
private const string k_SdkImportPlayerPref = "UnityUdpSdkImported"; |
|
|
|
static SdkImportEvent() |
|
{ |
|
if (!PlayerPrefs.HasKey(k_SdkImportPlayerPref)) |
|
{ |
|
PlayerPrefs.SetInt(k_SdkImportPlayerPref, 1); |
|
|
|
UnityWebRequest request = EditorAnalyticsApi.ImportSdk(); |
|
EditorAnalyticsReqStruct reqStruct = new EditorAnalyticsReqStruct |
|
{ |
|
eventName = EditorAnalyticsApi.k_ImportSDKEventName, |
|
webRequest = request |
|
}; |
|
|
|
// Send the request |
|
WebRequestQueue.Enqueue(reqStruct); |
|
} |
|
} |
|
} |
|
} |
|
|
|
#endif |