The Swartz-Manning’s first exhibit will provide a detailed history of Aaron Swartz Day. https://www.aaronswartzday.org/vr
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

DebugUI.cs 982B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. //======= Copyright (c) Valve Corporation, All rights reserved. ===============
  2. //
  3. // Purpose: Debug UI shown for the player
  4. //
  5. //=============================================================================
  6. using UnityEngine;
  7. using UnityEngine.UI;
  8. using System.Collections;
  9. namespace Valve.VR.InteractionSystem
  10. {
  11. //-------------------------------------------------------------------------
  12. public class DebugUI : MonoBehaviour
  13. {
  14. private Player player;
  15. //-------------------------------------------------
  16. static private DebugUI _instance;
  17. static public DebugUI instance
  18. {
  19. get
  20. {
  21. if ( _instance == null )
  22. {
  23. _instance = GameObject.FindObjectOfType<DebugUI>();
  24. }
  25. return _instance;
  26. }
  27. }
  28. //-------------------------------------------------
  29. void Start()
  30. {
  31. player = Player.instance;
  32. }
  33. //-------------------------------------------------
  34. private void OnGUI()
  35. {
  36. #if !HIDE_DEBUG_UI
  37. player.Draw2DDebug();
  38. #endif
  39. }
  40. }
  41. }