public static VRGestureSettings CreateGestureSettingsAsset()
        {
            VRGestureSettings instance = CreateInstance <VRGestureSettings>();

            AssetDatabase.CreateAsset(instance, Config.SETTINGS_FILE_PATH);
            return(instance);
        }
Example #2
0
        //Load a SavedRecognizer from a file
        public void Load(string filename)
        {
            gestureSettings = Utils.GetGestureSettings();
            NeuralNetworkStub stub = Utils.ReadNeuralNetworkStub(filename);

            outputs = stub.gestures;
            BuildOutputDictionary();
            neuralNet = new NeuralNetwork(stub.numInput, stub.numHidden, stub.numOutput);
            neuralNet.SetWeights(stub.weights);
        }
        void OnEnable()
        {
            gestureSettings = Utils.GetGestureSettings();

            rig = VRGestureRig.GetPlayerRig(gestureSettings.playerID);

            GestureRecognizer.GestureDetectedEvent      += OnGestureDetected;
            GestureRecognizer.GestureRejectedEvent      += OnGestureRejected;
            VRGestureUIPanelManager.OnPanelFocusChanged += PanelFocusChanged;
            //VRControllerUIInput.OnVRGuiHitChanged += VRGuiHitChanged;
        }
 void GetSetGestureSettings()
 {
     if (Utils.GetGestureSettings() == null)
     {
         gestureSettings = CreateGestureSettingsAsset();
     }
     else
     {
         gestureSettings = Utils.GetGestureSettings();
     }
 }
        public override void Init()
        {
            base.Init();

            if (gestureSettings == null)
            {
                gestureSettings = Utils.GetGestureSettings();
            }
            if (tutorial == null)
            {
                tutorial = GetComponentInParent <GettingStartedTutorial>();
            }
        }
Example #6
0
        // INIT
        void Start()
        {
            gestureSettings = Utils.GetGestureSettings();

            galleryPosition = new Vector3(0, 90, 0);

            canvasGroup = GetComponent <CanvasGroup>();

            galleryStartPosition = transform.position;

            vrGestureUI = transform.parent.GetComponent <VRGestureUI>();

            galleryRB = GetComponent <Rigidbody>();

            galleryState = GestureGalleryState.NotVisible;

            GetHands();
        }
        new public void Awake()
        {
            base.Awake();

            gestureSettings = Utils.GetGestureSettings();

            if (gestureSettings.stateInitial == VRGestureUIState.ReadyToDetect)
            {
                initialPanel = "Detect Menu";
            }

            // initialize initial panel focused
            if (gestureSettings.neuralNets.Count <= 0)
            {
                FocusPanel("No Neural Net Menu");
            }
            else
            {
                FocusPanel(initialPanel);
            }
        }
Example #8
0
        // EVENTS

        void OnEnable()
        {
            VRGestureUIPanelManager.OnPanelFocusChanged += PanelFocusChanged;
            gestureSettings = Utils.GetGestureSettings();
        }