private void Reset() { if (leapSpace == null) { leapSpace = FindObjectOfType <LeapSpace>(); } }
public override SupportInfo GetSpaceSupportInfo(LeapSpace space) { if (space == null || space is LeapCylindricalSpace || space is LeapSphericalSpace) { return(SupportInfo.FullSupport()); } else { return(SupportInfo.Error("Dynamic Renderer does not support " + space.GetType().Name)); } }
public void validateSpaceComponent() { var origSpace = _space; var spaces = Pool <List <LeapSpace> > .Spawn(); spaces.Clear(); try { GetComponents <LeapSpace>(spaces); _space = spaces.Query().FirstOrDefault(s => s.enabled); } finally { spaces.Clear(); Pool <List <LeapSpace> > .Recycle(spaces); } // Support Undo/Redo with runtime space changes in-editor bool didUndoRedo = false; #if UNITY_EDITOR if (_didUndoRedoThisFrame) { didUndoRedo = true; _didUndoRedoThisFrame = false; } #endif if (Application.isPlaying && (origSpace != _space || (_space == null && !_lastSpaceWasNull)) || didUndoRedo ) { onRuntimeSpaceChanged(); } _lastSpaceWasNull = _space == null; }
private Vector3 transformPoint(Vector3 worldPoint, LeapSpace space) { Vector3 localPalmPos = space.transform.InverseTransformPoint(worldPoint); return(space.transform.TransformPoint(space.transformer.InverseTransformPoint(localPalmPos))); }
public abstract SupportInfo GetSpaceSupportInfo(LeapSpace space);
public override SupportInfo GetSpaceSupportInfo(LeapSpace space) { return(SupportInfo.FullSupport()); }