Пример #1
0
        private void Start()
        {
            if (TBInput.GetControllerModel(controller) == VRController.None)
            {
                gameObject.SetActive(false);
                Debug.LogWarning("Finger chart was disabled because no controller was found for " + controller + ". Is that input type enabled in Input Settings?");
                return;
            }

            if (!TBInput.SupportsFinger(TBInput.Finger.Thumb, controller))
            {
                _thumb.enabled = false;
                _thumb.transform.parent.gameObject.SetActive(false);
            }
            if (!TBInput.SupportsFinger(TBInput.Finger.Index, controller))
            {
                _index.transform.parent.gameObject.SetActive(false);
                _index.enabled = false;
            }
            if (!TBInput.SupportsFinger(TBInput.Finger.Grip, controller))
            {
                _grip.transform.parent.gameObject.SetActive(false);
                _grip.enabled = false;
            }

            if (controller == TBInput.Controller.RHandController)
            {
                ToggleHandedness();
            }
        }