Ejemplo n.º 1
0
        protected override void OnStart()
        {
            base.OnStart();

            try
            {
                VRLog.Debug("Loading GripMoveTool", new object[0]);
                _settings   = (VR.Manager.Context.Settings as KKCharaStudioVRSettings);
                internalGui = GUIQuad.Create(null);
                resetGUIPosition();
                internalGui.gameObject.AddComponent <MoveableGUIObject>();
                internalGui.gameObject.AddComponent <BoxCollider>();
                internalGui.IsOwned = true;
                DontDestroyOnLoad(internalGui.gameObject);
                CreatePointer();
                gripMenuHandler         = gameObject.AddComponent <GripMenuHandler>();
                gripMenuHandler.enabled = false;
            }
            catch (Exception ex)
            {
                VRLog.Debug(ex);
            }

            if (marker == null)
            {
                marker = new GameObject("__GripMoveMarker__");
                marker.transform.parent   = transform.parent;
                marker.transform.position = transform.position;
                marker.transform.rotation = transform.rotation;
            }

            if (_settings != null)
            {
                moveSelfButton     = EVRButtonId.k_EButton_Grip;
                moveSelfButtonName = "rgrip";
                grabScreenButton   = EVRButtonId.k_EButton_Axis1;
            }

            menuHandlder = GetComponent <MenuHandler>();
            ikTool       = IKTool.instance;
        }
Ejemplo n.º 2
0
        public StudioContext()
        {
            _Materials = new DefaultMaterialPalette();
            Settings   = KKCharaStudioVRSettings.Load(Path.Combine(configPath, "KKCSVRSettings.xml"));

            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.001f;
            PreferredGUI     = GUIType.IMGUI;
            CameraClearFlags = CameraClearFlags.Skybox;
        }