The coffee studio is a small studio created by a coffee addicter who love to make small things joyful. We are focusing on Unity-based casual games for the past serveral years.
Drag N Drop 3D
Drag N Drop 3D is an unity asset aims to provide unity developer with a simple and easy way to create a drag and drop functionality from UI-space to a predefined world-space destination in 3D environment. Feature:
- Configurable Distance: The distance between dragging object and destination in world space which is considered as close enough to drop the item.
- Auto Move Back: Move the dragging object back when the distance to target larger than the configured distance
- Identical Rotation: Dragging object is in 3D and have identical rotation as the destination object while the destination object is rotate.
- Work When Rotate: Work even when the destination object is rotating.
- Easy to Configure: Distance and target, source list is configurable through the editor.
Create a DragNDropConfig game object and then add DragNDropConfig component to the the game object.
Configure DragNDropConfig component
- Camera: Specify camera which the destination game object is viewed by. If empty, the main camera is used
- Good distance: The distance between dragging object and destination in world space which is considered as close enough to drop the item.
- DragNDrops: A List contains drag and drop detail.
- Source: Transform in UI which the drag item will start from.
- Destination: Transform in World space which the drag item will end at.
- Moving prefab: Prefab of the item which is shown while item is being dragged.