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.
 
 
 
 
 
 

34 lines
1.0 KiB

using UnityEditor;
using UnityEngine.Networking;
#if (UNITY_5_6_OR_NEWER && !UNITY_5_6_0)
namespace UnityEngine.UDP.Editor.Analytics
{
[InitializeOnLoad]
public static class ProjectOpenEvent
{
private const string k_ProjectOpened = "UdpProjectOpened";
static ProjectOpenEvent()
{
if (!SessionState.GetBool(k_ProjectOpened, false))
{
if (EditorUserBuildSettings.activeBuildTarget.Equals(BuildTarget.Android) && Common.TargetUDP())
{
SessionState.SetBool(k_ProjectOpened, true);
UnityWebRequest request = EditorAnalyticsApi.ProjectOpened();
EditorAnalyticsReqStruct reqStruct = new EditorAnalyticsReqStruct
{
eventName = EditorAnalyticsApi.k_ProjectOpenEventName,
webRequest = request,
};
WebRequestQueue.Enqueue(reqStruct);
}
}
}
}
}
#endif