//////////////////////////////////////////////////////////////////////////////////////////////// /*--------------------------------------------------------------------------------------------*/ public void Awake() { InputModuleUtil.FindCursorReference(this, ref CursorDataProvider, false); if (LeapControl == null) { LeapControl = FindObjectOfType <HandController>(); } if (Look.FollowTransform == null) { GameObject lookGo = GameObject.Find("CenterEyeAnchor"); Look.FollowTransform = (lookGo == null ? null : lookGo.transform); } }
/*--------------------------------------------------------------------------------------------*/ public void Update() { if (!InputModuleUtil.FindCursorReference(this, ref CursorDataProvider, true)) { return; } if (!Application.isPlaying) { return; } CursorDataProvider.MarkAllCursorsUnused(); UpdateCursorsWithHands(LeapControl.GetFrame().Hands); Look.UpdateData(CursorDataProvider); CursorDataProvider.ActivateAllCursorsBasedOnUsage(); }