Esempio n. 1
0
    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;
    }
Esempio n. 2
0
    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);
    }
Esempio n. 3
0
 void TogglePZ()
 {
     usePZ = !usePZ;
     PZSpeed.UsePZ(usePZ);
 }