Test_OpenDialog.cs 856 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. using System;
  2. using UnityEngine;
  3. public class Test_OpenDialog : MonoBehaviour
  4. {
  5. public void OpenDialog01()
  6. {
  7. VRDialogMenu.TYPE_STYLE style = (VRDialogMenu.TYPE_STYLE)12;
  8. this.m_DialogMenu.OpenDialog(this.dialogMessage, style, delegate(VRDialogMenu.TYPE_STYLE buttonType)
  9. {
  10. if (buttonType == VRDialogMenu.TYPE_STYLE.OK)
  11. {
  12. Debug.Log("OKボタンでした");
  13. }
  14. else if (buttonType == VRDialogMenu.TYPE_STYLE.CANCEL)
  15. {
  16. Debug.Log("CANCELボタンでした");
  17. }
  18. this.m_DialogMenu.CloseDialog();
  19. this.num++;
  20. });
  21. }
  22. private void Start()
  23. {
  24. VRCanvasManager.Instance.OpenVRDecideUseTouch(delegate(bool useOculus)
  25. {
  26. Debug.Log((!useOculus) ? "Mouse & Keyboard" : "OculusTouch");
  27. });
  28. }
  29. [SerializeField]
  30. private VRDialogMenu m_DialogMenu;
  31. [TextArea(4, 20)]
  32. public string dialogMessage;
  33. public int num;
  34. }