void Awake() { /// When using the FVRContainer prefab, the FVRConnection won't be destroyed on load allowing you to keep your calibrated gestures and centering data. /// Since the FVRConnection comes from a previous scene, you can't drag and drop it into a public variable when you are making the scene. /// So when the new scene gets loaded you will need to find the FVRConnection instance in order to use it. fvr = GameObject.Find("FVR").GetComponent <FVRConnection> (); gm = fvr.gameObject.GetComponent <FVRGestureManager>(); }
void Start() { /// When using the FVRContainer prefab, the FVRConnection won't be destroyed on load allowing you to keep your calibrated gestures and centering data. /// Since the FVRConnection comes from a previous scene, you can't drag and drop it into a public variable when you are making the scene. /// So when the new scene gets loaded you will need to find the FVRConnection instance in order to use it. fvr = GameObject.Find("FVR").GetComponent <FVRConnection> (); // Getting the visual components msVals = transform.Find("MsValues").GetComponentsInChildren <Text> (); }
void Start() { /// When using the FVRContainer prefab, the FVRConnection won't be destroyed on load allowing you to keep your calibrated gestures and centering data. /// Since the FVRConnection comes from a previous scene, you can't drag and drop it into a public variable when you are making the scene. /// So when the new scene gets loaded you will need to find the FVRConnection instance in order to use it. fvr = FindObjectOfType(typeof(FVRConnection)) as FVRConnection; // Create a new custom gesture gesture = fvr.gestureManager.RegisterCustomGesture("gestureName"); // Display the default settings samplesPerSecond = fvr.gestureManager.calibrationSamplesPerSecond; roundLength = (int)fvr.gestureManager.calibrationRoundLength; UpdateTexts(); // Button control targetBtn.interactable = false; }