void Awake() { // Guard against accidentally initializing twice if this GameObject // is created again (for example, navigating back to the scene it was // initially added to) if (initialized) { return; } PZSpeed.SetLogLevel(LogLevel); PZSpeed.Init(AppID, ApiKey); PZSpeed.UsePZ(UsePZ); PZSpeed.ShouldReportAnalytics = ShouldReportAnalytics; PZSpeed.MeasureAppLaunchDelay(MeasureAppLaunchDelay); initialized = true; }
void Start() { // grab the initial value of PZ from the config object PacketZoom pz = FindObjectOfType(typeof(PacketZoom)) as PacketZoom; if (pz != null) { usePZ = pz.UsePZ; } StartCoroutine(UpdateLoadingDots()); Debug.Log("Is reporting analytics: " + PZSpeed.ShouldReportAnalytics); Debug.Log("Is measuring app launch delay: " + PZSpeed.IsMeasuringAppLaunchDelay()); var success = PZSpeed.AppLaunchCompleted(); Debug.Log("App launch delay measure success: " + success); }
void TogglePZ() { usePZ = !usePZ; PZSpeed.UsePZ(usePZ); }