public override void OnHandEntered() { Debug.LogError("This is an example error message!"); numErrorsTriggered++; VrDebugStats.SetStat("Errors", "Errors triggered", numErrorsTriggered); }
public override void OnHandEntered() { numWarningsTriggered++; // Log this to two separate categories VrDebugStats.SetStat("Gameplay", "Warnings triggered", numWarningsTriggered); VrDebugStats.SetStat("Errors", "Warnings triggered", numWarningsTriggered); Debug.LogWarning("This is a warning message!"); }
public override void OnHandEntered() { // This message will go to the console and the vr console Debug.Log("Spawning ball number " + nextBallNumber); // This creates/updates a debug stat for the vr stats panel VrDebugStats.SetStat("Gameplay", "Num balls", nextBallNumber); // Now actually spawn the ball GameObject ball = GameObject.CreatePrimitive(PrimitiveType.Sphere); ball.name = "Ball " + nextBallNumber; ball.transform.position = this.transform.position; ball.transform.localScale = new Vector3(0.1f, 0.1f, 0.1f); ball.AddComponent <Rigidbody> (); nextBallNumber++; }
public void OnDisable() { VrDebugStats.AllowLogging(false); }
public void OnEnable() { VrDebugStats.AllowLogging(true); VirtualConsole.instance = this; }
public override void OnHandEntered() { VrDebugStats.SetStat("Example", "Was exception triggered", true); throw new System.NullReferenceException("This is an example null reference exception"); }