// Start is called before the first frame update void Start() { canvas = GameObject.Find("Canvas"); fromScroller = false; yCoord = 90; xCoord = 255; URLsList = RecipeInformation.ingredientURLlistoflist; URLs = URLsList[0]; videoURL = RecipeMenuList.SelectedRecipe.steps[step_number].videoUrl; MLHands.Start(); gestures = new MLHandKeyPose[7]; gestures[0] = MLHandKeyPose.Ok; gestures[1] = MLHandKeyPose.Thumb; gestures[2] = MLHandKeyPose.L; gestures[3] = MLHandKeyPose.OpenHand; gestures[4] = MLHandKeyPose.Pinch; gestures[5] = MLHandKeyPose.Finger; gestures[6] = MLHandKeyPose.Fist; MLHands.KeyPoseManager.EnableKeyPoses(gestures, true, false); thisText = GameObject.Find("Recipe step").GetComponent <Text>(); audio = gameObject.AddComponent <AudioSource>(); audio.clip = notification; startPopulateTimers(); ges_instructions = GameObject.Find("Gesture instruction").GetComponent <Text>(); ingred = GameObject.Find("Ingredients").GetComponent <Text>(); }
private void Awake() { MLHands.Start(); // seems you need at least one pose to track keypoints _gestures = new MLHandKeyPose[1]; _gestures[0] = MLHandKeyPose.Finger; MLHands.KeyPoseManager.EnableKeyPoses(_gestures, true); _renderes = new List <MeshRenderer> { LeftIndexTip.gameObject.GetComponent <MeshRenderer>(), LeftThumbTip.gameObject.GetComponent <MeshRenderer>(), LeftPinkyTip.gameObject.GetComponent <MeshRenderer>(), LeftCenter.gameObject.GetComponent <MeshRenderer>(), LeftWrist.gameObject.GetComponent <MeshRenderer>(), RightIndexTip.gameObject.GetComponent <MeshRenderer>(), RightThumbTip.gameObject.GetComponent <MeshRenderer>(), RightPinkyTip.gameObject.GetComponent <MeshRenderer>(), RightCenter.gameObject.GetComponent <MeshRenderer>(), RightWrist.gameObject.GetComponent <MeshRenderer>() }; _leftFingerCollider = LeftIndexTip.gameObject.GetComponent <SphereCollider>(); _leftCenterCollider = LeftCenter.gameObject.GetComponent <MeshCollider>(); _rightFingerCollider = RightIndexTip.gameObject.GetComponent <SphereCollider>(); _rightCenterCollider = RightCenter.gameObject.GetComponent <MeshCollider>(); }
/// <summary> /// Initializes MLHands API. /// </summary> void OnEnable() { if (!MLHands.Start()) { Debug.LogError("Error GesturesExample starting MLHands, disabling script."); enabled = false; return; } }
/// <summary> /// Initializes MLHands API. /// </summary> void OnEnable() { if (!MLHands.Start()) { Debug.LogError("Error GesturesKeypointVisualizer starting MLHands, disabling script."); enabled = false; return; } }
// Use this for initialization void Start() { if (!MLHands.Start()) { Debug.Log("MLHands didn't start...bail."); return; } //set gestures to track setGesturesToTrack(); }
private void Awake() { if (!(MLHands.Start().IsOk)) { Debug.LogError("Error GesturesKeypointVisualizer starting MLHands, disabling script."); enabled = false; return; } _image = GetComponent <Image>(); }
/// <summary> /// Initializes MLHands API. /// </summary> void OnEnable() { MLResult result = MLHands.Start(); if (!result.IsOk) { Debug.LogError("Error GesturesExample starting MLHands, disabling script."); enabled = false; return; } }
private int stepIndex; // marks the recipe step void Start() { MLHands.Start(); gestures = new MLHandKeyPose[2]; gestures[0] = MLHandKeyPose.Ok; gestures[1] = MLHandKeyPose.Thumb; MLHands.KeyPoseManager.EnableKeyPoses(gestures, true, false); }
private void Awake() { MLHands.Start(); _gestures = new MLHandKeyPose[5]; _gestures[0] = MLHandKeyPose.Ok; _gestures[1] = MLHandKeyPose.Finger; _gestures[2] = MLHandKeyPose.OpenHandBack; _gestures[3] = MLHandKeyPose.Fist; _gestures[4] = MLHandKeyPose.Thumb; MLHands.KeyPoseManager.EnableKeyPoses(_gestures, true, false); }
/// <summary> /// Initializes MLHands API. /// </summary> void Start() { MLResult result = MLHands.Start(); if (!result.IsOk) { Debug.LogErrorFormat("Error: HandTrackingVisualizer failed starting MLHands, disabling script. Reason: {0}", result); enabled = false; return; } }
/// <summary> /// Initializes and finds references to all relevant components in the /// scene and registers required events. /// </summary> void OnEnable() { if (!MLHands.Start()) { Debug.LogError("Error Gestures starting MLHands, disabling script."); enabled = false; return; } UpdateGestureStates(true); }
// Use this for initialization void Start() { audio = GetComponent <AudioSource>(); MLHands.Start(); MLHandKeyPose[] _gestures = new MLHandKeyPose[] { MLHandKeyPose.Thumb }; MLHands.KeyPoseManager.EnableKeyPoses(_gestures, true, false); initpos = sphere.transform.position; }
// Start is called before the first frame update private void Start() { MLHands.Start(); _gestures = new MLHandKeyPose[5]; _gestures[0] = MLHandKeyPose.Ok; _gestures[1] = MLHandKeyPose.Finger; _gestures[2] = MLHandKeyPose.OpenHand; _gestures[3] = MLHandKeyPose.Pinch; _gestures[4] = MLHandKeyPose.Thumb; MLHands.KeyPoseManager.EnableKeyPoses(_gestures, true, false); pos = new Vector3[3]; }
private void Start() { MLHands.Start(); renderer = GetComponent <MeshRenderer>(); Debug.Assert(renderer); MLHands.KeyPoseManager.EnableKeyPoses(handPoses, true); MLHands.KeyPoseManager.SetKeyPointsFilterLevel(keyPointFilterLevel); MLHands.KeyPoseManager.SetPoseFilterLevel(poseFilterLevel); }
/// <summary> /// Initializes MLHands API. /// </summary> void Start() { MLResult result = MLHands.Start(); if (!result.IsOk) { Debug.LogError("Error HandTrackingVisualizer starting MLHands, disabling script."); enabled = false; return; } Initialize(); }
void StartMlHands() { MLHands.Start(); _gestures = new MLHandKeyPose[7]; _gestures[0] = MLHandKeyPose.Thumb; _gestures[1] = MLHandKeyPose.L; _gestures[2] = MLHandKeyPose.OpenHand; _gestures[3] = MLHandKeyPose.Pinch; _gestures[4] = MLHandKeyPose.Fist; _gestures[5] = MLHandKeyPose.Ok; _gestures[6] = MLHandKeyPose.Finger; MLHands.KeyPoseManager.EnableKeyPoses(_gestures, true, false); }
private void InitializeHands() { MLResult result = MLHands.Start(); if (!result.IsOk) { Debug.LogErrorFormat("Error: HandTrackingUICollision failed starting MLHands, disabling script. Reason: {0}", result); enabled = false; return; } _leftHand = CreateHand(); _rightHand = CreateHand(); }
void Init() { //hands MLHands.Start(); //controller MLInput.OnControllerButtonUp += HandleOnButtonUp; MLInput.OnControllerButtonDown += HandleOnButtonDown; _controllerConnectionHandler = GetComponent <ControllerConnectionHandler>(); if (_controllerConnectionHandler != null) { controllerDynamic = GetComponent <DynamicObject>(); } }
void Start() { MLHands.Start(); if (handType == MLHandType.Right) { hand = MLHands.Right; } else { hand = MLHands.Left; } system.Stop(); curPose = hand.KeyPose; }
//----------- MonoBehaviour Methods ----------- private void OnEnable() { MLResult result = MLHands.Start(); if (!result.IsOk) { Debug.LogError("MLHands.Start() error"); enabled = false; return; } MLHands.KeyPoseManager.OnHandKeyPoseBegin += OnHandKeyPoseBegin; MLHands.KeyPoseManager.OnHandKeyPoseEnd += OnHandKeyPoseEnd; }
private void Start() { MLHands.Start(); _gestures = new MLHandKeyPose[5]; _gestures[0] = MLHandKeyPose.Ok; _gestures[1] = MLHandKeyPose.Finger; _gestures[2] = MLHandKeyPose.OpenHand; _gestures[3] = MLHandKeyPose.Fist; _gestures[4] = MLHandKeyPose.Thumb; MLHands.KeyPoseManager.EnableKeyPoses(_gestures, true, false); pos = new Vector3[3]; aS = GetComponent <AudioSource>(); chorus = GetComponent <AudioChorusFilter>(); }
void Start() { MLHands.Start(); gestures = new MLHandKeyPose[1]; gestures[0] = MLHandKeyPose.OpenHand; MLHands.KeyPoseManager.EnableKeyPoses(gestures, true, false); currState = Left_Hand_Tracker.state.NONE; interval = 30; currTime = interval; speed = 200f; }
private MLHandKeyPose[] gestures; // Array to store different gestures we will look for void Awake() { MLHands.Start(); gestures = new MLHandKeyPose[4]; gestures[0] = MLHandKeyPose.Ok; gestures[1] = MLHandKeyPose.Fist; gestures[2] = MLHandKeyPose.OpenHandBack; gestures[3] = MLHandKeyPose.Finger; MLHands.KeyPoseManager.EnableKeyPoses(gestures, true, false); // Cube is deactivated at first cube = GameObject.Find("Cube"); cube.SetActive(false); }
private MLHandKeyPose[] gestures; // Holds the different hand poses we will look for // Start is called before the first frame update void Start() { MLHands.Start(); // Start the hand tracking. gestures = new MLHandKeyPose[4]; //Assign the gestures we will look for. gestures[0] = MLHandKeyPose.Ok; gestures[1] = MLHandKeyPose.Fist; gestures[2] = MLHandKeyPose.OpenHand; gestures[3] = MLHandKeyPose.Finger; // Enable the hand poses. MLHands.KeyPoseManager.EnableKeyPoses(gestures, true, false); cube = GameObject.Find("Cube"); // Find our Cube in the scene. cube.SetActive(false); }
/// <summary> /// Initializes and finds references to all relevant components in the /// scene and registers required events. /// </summary> void OnEnable() { MLResult result = MLHands.Start(); if (!result.IsOk) { Debug.LogErrorFormat("Error: HandTracking failed starting MLHands, disabling script. Reason: {0}", result); enabled = false; return; } UpdateKeyPoseStates(true); MLHands.KeyPoseManager.SetKeyPointsFilterLevel(_keyPointFilterLevel); MLHands.KeyPoseManager.SetPoseFilterLevel(_PoseFilterLevel); }
void Awake() { MLResult result = MLHands.Start(); if (!result.IsOk) { Debug.LogError("Error starting MLHand, disabling script."); enabled = false; return; } var enabledPoses = new MLHandKeyPose[] { KEY_POSE }; MLHands.KeyPoseManager.EnableKeyPoses(enabledPoses, true); }
private void Start() { MLHands.Start(); spawnIndicatorPose[0] = MLHandKeyPose.Fist; spawnIndicatorPose[1] = MLHandKeyPose.Pinch; spawnIndicatorPose[2] = MLHandKeyPose.Ok; spawnIndicatorPose[3] = MLHandKeyPose.OpenHand; spawnIndicatorPose[4] = MLHandKeyPose.Finger; spawnIndicatorPose[5] = MLHandKeyPose.Thumb; spawnIndicatorPose[6] = MLHandKeyPose.L; spawnIndicatorPose[7] = MLHandKeyPose.C; spawnIndicatorPose[8] = MLHandKeyPose.NoHand; spawnIndicatorPose[9] = MLHandKeyPose.NoPose; MLHands.KeyPoseManager.EnableKeyPoses(spawnIndicatorPose, true, false); }
void OnEnable() { MLResult _result = MLHands.Start(); if (!_result.IsOk) { Debug.LogError("Not running on device or ZI = no gestures"); enabled = false; return; } _gestures = new MLHandKeyPose[4]; _gestures[0] = MLHandKeyPose.OpenHandBack; _gestures[1] = MLHandKeyPose.L; _gestures[2] = MLHandKeyPose.Ok; _gestures[3] = MLHandKeyPose.Fist; MLHands.KeyPoseManager.EnableKeyPoses(_gestures, true, true); }
private MLHandKeyPose[] gestures; // Holds the different hand poses we will look for. void Awake() { PNConfiguration pnConfiguration = new PNConfiguration(); pnConfiguration.PublishKey = "pub-c-ae388464-6b8a-430e-be0a-64377c198dda"; pnConfiguration.SubscribeKey = "sub-c-77c1dde4-dc65-11e8-b7c4-3e16c06ff365"; pnConfiguration.Secure = true; pubnub = new PubNub(pnConfiguration); onText = GameObject.Find("OnText").GetComponent <Text>(); onGesture = GameObject.Find("onGesture").GetComponent <Image>(); MLHands.Start(); // Start the hand tracking. gestures = new MLHandKeyPose[1]; //Assign the gestures we will look for. gestures[0] = MLHandKeyPose.Thumb; MLHands.KeyPoseManager.EnableKeyPoses(gestures, true, false); // Enable the hand poses. }
private void Awake() { _renderes = new List <MeshRenderer> { LeftIndexTip.gameObject.GetComponent <MeshRenderer>(), LeftThumbTip.gameObject.GetComponent <MeshRenderer>(), LeftPinkyTip.gameObject.GetComponent <MeshRenderer>(), LeftCenter.gameObject.GetComponent <MeshRenderer>(), LeftWrist.gameObject.GetComponent <MeshRenderer>(), RightIndexTip.gameObject.GetComponent <MeshRenderer>(), RightThumbTip.gameObject.GetComponent <MeshRenderer>(), RightPinkyTip.gameObject.GetComponent <MeshRenderer>(), RightCenter.gameObject.GetComponent <MeshRenderer>(), RightWrist.gameObject.GetComponent <MeshRenderer>() }; if (!MagicLeapDevice.IsReady()) { Debug.LogWarning("Disabling MagicBubbles.Scripts.HandTracking because MagicLeapDevice wasn't ready."); enabled = false; return; } var result = MLHands.Start(); if (!result.IsOk) { Debug.LogWarning("Disabling MagicBubbles.Scripts.HandTracking because MLHands didn't start."); enabled = false; return; } _gestures = new MLHandKeyPose[4]; _gestures[0] = MLHandKeyPose.Finger; _gestures[1] = MLHandKeyPose.OpenHandBack; _gestures[2] = MLHandKeyPose.Fist; _gestures[3] = MLHandKeyPose.Pinch; MLHands.KeyPoseManager.EnableKeyPoses(_gestures, true); _leftFingerCollider = LeftIndexTip.gameObject.GetComponent <SphereCollider>(); _leftCenterCollider = LeftCenter.gameObject.GetComponent <MeshCollider>(); _rightFingerCollider = RightIndexTip.gameObject.GetComponent <SphereCollider>(); _rightCenterCollider = RightCenter.gameObject.GetComponent <MeshCollider>(); }