onGUI() public method

public onGUI ( ) : void
return void
コード例 #1
0
 private void OnGUI()
 {
     popupWindow.onGUI();
     GUI.contentColor = Color.black;
     onCustomEventGUI();
     onParamsGUI();
     if (Button("Back To Main Scene"))
     {
         SceneManager.LoadScene("MainScene");
     }
     GUILayout.Label(JSONEncoder.Encode(eventParameters));
 }
コード例 #2
0
    private void OnGUI()
    {
        popupWindow.onGUI();

        GUI.contentColor = Color.black;

        onCustomEventGUI();
        onParamsGUI();
        onEnvironmentGUI();

        if (Button("Back To Main Scene"))
        {
            SceneManager.LoadScene("MainScene");
        }

        GUILayout.Label(YMMJSONUtils.JSONEncoder.Encode(map));
    }
コード例 #3
0
    private void OnGUI()
    {
        initGUI();

        popupWindow.onGUI();

        var metrica = AppMetrica.Instance;

        if (Button("Report Test"))
        {
            string report = "Test" + counter++;
            metrica.ReportEvent(report);
            popupWindow.showPopup("Report: " + report);
        }
        if (Button("Track Location Enabled: " + isTrackLocationEnabled))
        {
            isTrackLocationEnabled = !isTrackLocationEnabled;
            metrica.SetTrackLocationEnabled(isTrackLocationEnabled);
        }
        if (Button("[CRASH] NullReference"))
        {
            nullGameObject.SendMessage("");
        }
        if (Button("LOG Library Version"))
        {
            popupWindow.showPopup("Version: " + metrica.LibraryVersion);
        }
        if (Button("LOG Library API Level"))
        {
            popupWindow.showPopup("Level: " + metrica.LibraryApiLevel);
        }
        if (Button("[SCENE] Load"))
        {
            SceneManager.LoadScene("AnotherScene");
        }

        if (Button("Exit"))
        {
            Application.Quit();
        }
    }
コード例 #4
0
ファイル: MainSceneManager.cs プロジェクト: nedved8891/Jelly
    private void OnGUI()
    {
        InitGUI();
        popupWindow.onGUI();

        var metrica = AppMetrica.Instance;

        if (Button("Report Test"))
        {
            string report = "Test" + testCounter++;
            metrica.ReportEvent(report);
            popupWindow.showPopup("Report: " + report);
        }
        if (Button("Send Event Immediately"))
        {
            string report = "Event" + eventCounter++;
            metrica.ReportEvent(report);
            metrica.SendEventsBuffer();
            popupWindow.showPopup("Report: " + report);
        }
        if (Button("Track Location Enabled: " + isLocationTracking))
        {
            isLocationTracking = !isLocationTracking;
            metrica.SetLocationTracking(isLocationTracking);
        }
        if (Button("Send Statistics Enabled: " + isStatisticsSending))
        {
            isStatisticsSending = !isStatisticsSending;
            metrica.SetStatisticsSending(isStatisticsSending);
        }
        if (Button("[CRASH] NullReference"))
        {
            nullGameObject.SendMessage("");
        }
        if (Button("LOG AppMetrica DeviceID"))
        {
            metrica.RequestAppMetricaDeviceID((deviceId, error) => {
                if (error != null)
                {
                    popupWindow.showPopup("Error: " + error);
                }
                else
                {
                    popupWindow.showPopup("DeviceID: " + deviceId);
                }
            });
        }
        if (Button("LOG Library Version"))
        {
            popupWindow.showPopup("Version: " + metrica.LibraryVersion);
        }
        if (Button("LOG Library API Level"))
        {
            popupWindow.showPopup("Level: " + metrica.LibraryApiLevel);
        }
        if (Button("[SCENE] Load"))
        {
            SceneManager.LoadScene("AnotherScene");
        }

        if (Button("Exit"))
        {
            Application.Quit();
        }
    }
コード例 #5
0
    private void OnGUI()
    {
        InitGUI();
        popupWindow.onGUI();
        IYandexAppMetrica instance = AppMetrica.Instance;

        if (Button("Report Test"))
        {
            string text = "Test" + testCounter++;
            instance.ReportEvent(text);
            popupWindow.showPopup("Report: " + text);
        }
        if (Button("Send Event Immediately"))
        {
            string text2 = "Event" + eventCounter++;
            instance.ReportEvent(text2);
            instance.SendEventsBuffer();
            popupWindow.showPopup("Report: " + text2);
        }
        if (Button("Track Location Enabled: " + isLocationTracking))
        {
            isLocationTracking = !isLocationTracking;
            instance.SetLocationTracking(isLocationTracking);
        }
        if (Button("Send Statistics Enabled: " + isStatisticsSending))
        {
            isStatisticsSending = !isStatisticsSending;
            instance.SetStatisticsSending(isStatisticsSending);
        }
        if (Button("[CRASH] NullReference"))
        {
            nullGameObject.SendMessage(string.Empty);
        }
        if (Button("LOG AppMetrica DeviceID"))
        {
            instance.RequestAppMetricaDeviceID(delegate(string deviceId, YandexAppMetricaRequestDeviceIDError? error)
            {
                if (error.HasValue)
                {
                    popupWindow.showPopup("Error: " + error);
                }
                else
                {
                    popupWindow.showPopup("DeviceID: " + deviceId);
                }
            });
        }
        if (Button("LOG Library Version"))
        {
            popupWindow.showPopup("Version: " + instance.LibraryVersion);
        }
        if (Button("LOG Library API Level"))
        {
            popupWindow.showPopup("Level: " + instance.LibraryApiLevel);
        }
        if (Button("[SCENE] Load"))
        {
            SceneManager.LoadScene("AnotherScene");
        }
        if (Button("Exit"))
        {
            Application.Quit();
        }
    }