Пример #1
0
        protected override void OnAwake()
        {
            base.OnAwake();

            _Settings = (VR.Context.Settings as KoikatuSettings);
            _KeySet   = _Settings.KeySets[0];
        }
Пример #2
0
        // XMLSerializerは配列にデフォルト値をつけると、指定値とデフォルト値の両方を含む配列にしてしまうので
        public static KoikatuSettings Load(string path)
        {
            KoikatuSettings settings = VRSettings.Load <KoikatuSettings>(path);

            if (settings.KeySets.Count == 0)
            {
                settings.KeySets = new List <KeySet> {
                    new KeySet()
                };
            }

            return(settings);
        }
Пример #3
0
        public ConfigurableContext()
        {
            // We'll keep those always the same
            _Materials = new DefaultMaterialPalette();
            _Settings  = KoikatuSettings.Load("VRSettings.xml");

            // Set defaults
            ConfineMouse = true;
            EnforceDefaultGUIMaterials = false;
            GUIAlternativeSortingMode  = false;
            GuiLayer         = "Default";
            GuiFarClipPlane  = 1000f;
            GuiNearClipPlane = -1000f;
            IgnoreMask       = 0;
            InvisibleLayer   = "Ignore Raycast";
            PrimaryColor     = Color.cyan;
            SimulateCursor   = true;
            UILayer          = "UI";
            UILayerMask      = LayerMask.GetMask(UILayer);
            UnitToMeter      = 1f;
            NearClipPlane    = 0.1f;
            PreferredGUI     = GUIType.uGUI;
        }