public static void CheckHandTarget(Handle handle) { HandTarget handTarget = (HandTarget)EditorGUILayout.ObjectField("Hand Target", handle.handTarget, typeof(HandTarget), true); if (handTarget != handle.handTarget) { if (handTarget != null) { if (handle.handTarget != null) { HandInteraction.LetGo(handle.handTarget); } if (handTarget.grabbedObject != null) { HandInteraction.LetGo(handTarget); } HandInteraction.MoveAndGrabHandle(handTarget, handle); handTarget.transform.parent = handle.transform; } else { HandInteraction.LetGo(handle.handTarget); } } }
public void LetGo() { if (handTarget != null && handTarget.grabbedObject != null) { Debug.Log("LetGo" + handTarget + " " + handTarget.grabbedObject); HandInteraction.LetGo(handTarget); } }
private void LetGoObject(HandTarget handTarget) { HandInteraction.LetGo(handTarget); grabbedObjectProp.objectReferenceValue = null; }