Esempio n. 1
0
        public override void OnHandEntered()
        {
            Debug.LogError("This is an example error message!");

            numErrorsTriggered++;
            VrDebugStats.SetStat("Errors", "Errors triggered", numErrorsTriggered);
        }
Esempio n. 2
0
        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!");
        }
Esempio n. 3
0
        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++;
        }
Esempio n. 4
0
 public void OnDisable()
 {
     VrDebugStats.AllowLogging(false);
 }
Esempio n. 5
0
        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");
        }