コード例 #1
0
        private Vector3 buttonRectScale; // new Vector3(0.6666f, 1, 0.2f);

        void Start()
        {
            panelManager = GetComponentInChildren <VRGestureUIPanelManager>();

            rootCanvas    = GetComponent <Canvas>();
            vrHandUIPanel = transform.Find("Panels");

            // start with hand UI visible
            uiVisible = true;
            Utils.ToggleCanvasGroup(panelManager.parentCanvasGroup, uiVisible);

            buttonRectScale = new Vector3(0.6666f, 1, 0.2f);

            // get vr player hand and camera
            rig            = VRGestureRig.GetPlayerRig(gestureSettings.playerID);
            menuHandedness = (rig.mainHand == Handedness.Left) ? Handedness.Right : Handedness.Left;
            Handedness oppositeHand = rig.mainHand == Handedness.Left ? Handedness.Right : Handedness.Left;

            vrMenuHand = rig.GetHand(menuHandedness);
            vrCam      = rig.head;

            GenerateGesturesMenu();
            StartCoroutine(GenerateNeuralNetMenuButtons());

            if (!gestureSettings.beginInDetectMode)
            {
                panelManager.FocusPanel("Select Neural Net Menu");
            }
            else
            {
                panelManager.FocusPanel("Detect Menu");
            }
        }
コード例 #2
0
 void GetHands()
 {
     //rig = VRGestureManager.Instance.rig;
     rig         = VRGestureRig.GetPlayerRig(gestureSettings.playerID);
     vrHand      = rig.GetHand(rig.mainHand);
     vrHandInput = rig.GetInput(rig.mainHand);
 }
コード例 #3
0
 private void Awake()
 {
     gestureSettings = Utils.GetGestureSettings();
     gestureRig      = VRGestureRig.GetPlayerRig(gestureSettings.playerID);
     EventCenter.AddListener(EventDefine.ShowGestureInfPanel, ShowGestureInfPanel);
     Init();
 }
コード例 #4
0
 private void Awake()
 {
     Init();
     gestureSettings = Utils.GetGestureSettings();
     gestureRig      = VRGestureRig.GetPlayerRig(gestureSettings.playerID);
     EventCenter.AddListener <string>(EventDefine.ShowGestureEditPanel, ShowGestureEditPanel);
     EventCenter.AddListener(EventDefine.FinishedGestureRecord, FinishedGestureRecord);
     EventCenter.AddListener <bool>(EventDefine.UIPointHovering, UIPointHovering);
 }
コード例 #5
0
        void OnEnable()
        {
            gestureSettings = Utils.GetGestureSettings();

            rig = VRGestureRig.GetPlayerRig(gestureSettings.playerID);

            GestureRecognizer.GestureDetectedEvent      += OnGestureDetected;
            GestureRecognizer.GestureRejectedEvent      += OnGestureRejected;
            VRGestureUIPanelManager.OnPanelFocusChanged += PanelFocusChanged;
            //VRControllerUIInput.OnVRGuiHitChanged += VRGuiHitChanged;
        }
コード例 #6
0
 private void Awake()
 {
     gestureSettings = Utils.GetGestureSettings();
     gestureRig      = VRGestureRig.GetPlayerRig(gestureSettings.playerID);
     back_Button     = transform.Find("Back_Button").GetComponent <Button>();
     back_Button.onClick.AddListener(() =>
     {
         EventCenter.Broadcast(EventDefine.ShowGestureMainPanel);
         gameObject.SetActive(false);
     });
     GestureName     = transform.Find("Name").GetComponent <Text>();
     GestureAccuracy = transform.Find("Accruacy").GetComponent <Text>();
     EventCenter.AddListener(EventDefine.ShowGestureDetectPanel, ShowGestureDetectPanel);
     GestureRecognizer.GestureDetectedEvent += GestureRecognizer_GestureDetectedEvent;
     gameObject.SetActive(false);
 }
コード例 #7
0
 void Awake()
 {
     gestureSettings = Utils.GetGestureSettings();
     gestureRig      = VRGestureRig.GetPlayerRig(gestureSettings.playerID);
     gesture_inf     = transform.Find("Ges_Inf").GetComponent <Button>();
     gesture_inf.onClick.AddListener(() => {
         EventCenter.Broadcast(EventDefine.ShowGestureInfPanel);
         gameObject.SetActive(false);
     });
     gesture_detect = transform.Find("Ges_Detect").GetComponent <Button>();
     gesture_detect.onClick.AddListener(() => {
         EventCenter.Broadcast(EventDefine.ShowGestureDetectPanel);
         gameObject.SetActive(false);
     });
     EventCenter.AddListener(EventDefine.ShowGestureMainPanel, ShowGesturePanel);
     ShowGesturePanel();
 }
コード例 #8
0
 public virtual void Awake()
 {
     gestureSettings = Utils.GetGestureSettings();
     gestureRig      = VRGestureRig.GetPlayerRig(gestureSettings.playerID);
     GestureRecognizer.GestureDetectedEvent += GestureRecognizer_GestureDetectedEvent;
 }