private void Awake()
        {
            if (EventSystem.current == null)
            {
                new GameObject("[EventSystem]", typeof(EventSystem)).AddComponent <StandaloneInputModule>();
            }
            else if (EventSystem.current.GetComponent <StandaloneInputModule>() == null)
            {
                EventSystem.current.gameObject.AddComponent <StandaloneInputModule>();
            }

            ViveRoleBindingsHelper.AutoLoadConfig();

            m_toggleApplyOnStart.isOn = ViveRoleBindingsHelper.bindingConfig.apply_bindings_on_load;
        }
コード例 #2
0
        private void Awake()
        {
            ViveRole.Initialize();
            ViveRoleBindingsHelper.AutoLoadConfig();

            RefreshRoleSelection();

            // select the role that have largest binding count
            for (int i = 0, imax = m_roleSetButtonList.Count; i < imax; ++i)
            {
                if (!m_roleSetButtonList[i].roleMap.Handler.BlockBindings && m_roleSetButtonList[i].roleMap.BindingCount == m_maxBindingCount)
                {
                    SelectRoleSet(i);
                    break;
                }
            }
        }