Analytics.SimulationMetricsLogger.PrintLog C# (CSharp) Method

PrintLog() public static method

public static PrintLog ( ) : void
return void
        public static void PrintLog()
        {
            if (SimulationMetricsLogger.instance.stringBuilder == null) {
                SimulationMetricsLogger log = SimulationMetricsLogger.instance;
                Debug.LogError("Print(): Game metrics logger cannot output anything. Please double check.");
                log.outputField.text = "No game metrics report generated.";
            }
            else {
                SimulationMetricsLogger.instance.stringBuilder.Length = 0;
                SimulationMetricsLogger.instance.Print();
            }
        }

Usage Example

Beispiel #1
0
        public void Update()
        {
            this.outputField.GetComponentInChildren <Text>().text = this.outputField.text.ToString();

            if (Input.GetKeyUp(this.triggerKey))
            {
                ToggleCanvasGroup();
                SimulationMetricsLogger.PrintLog();
            }

            for (int i = 0; i < this.teamMetrics.Count; i++)
            {
                if (this.simulationMetricsLoggerStart)
                {
                    TeamMetric temp = this.teamMetrics[i];
                    temp.totalGameTimeSinceEpoch += Time.deltaTime;
                    if (this.gameStartFlag)
                    {
                        temp.totalGameTime += Time.deltaTime;
                    }
                    this.teamMetrics[i] = temp;
                }
            }
        }