Catlike Coding
Unity Code Documentation
Public Member Functions | List of all members
CatlikeCoding.Clipping.ClipBoxDragInput3D Class Reference

Adds support for dragging the contents of a ClipBox, using 3D input. More...

Inherits MonoBehaviour, CatlikeCoding.EventSystem.IPointerDownHandler, CatlikeCoding.EventSystem.IPointerUpHandler, and CatlikeCoding.EventSystem.IDragHandler.

Public Member Functions

void OnDrag (PointerEventData eventData)
 Called on the same component that the pointer went down on, after OnBeginDrag each time a pointer move is detected before it goes up. More...
 
void OnPointerDown (PointerEventData eventData)
 Called when pointer went down on this component. More...
 
void OnPointerUp (PointerEventData eventData)
 Called on the same component that the pointer went down on, after it went up. More...
 

Detailed Description

Adds support for dragging the contents of a ClipBox, using 3D input.

Attach this component to a ClipBox to make it work. It will add a box collider that covers the (clipped) viewport to catch user input. If you need to detect input for the box's contents as well, you'll have to position those colliders in front of this one.

Member Function Documentation

void CatlikeCoding.Clipping.ClipBoxDragInput3D.OnDrag ( PointerEventData  eventData)

Called on the same component that the pointer went down on, after OnBeginDrag each time a pointer move is detected before it goes up.

Parameters
eventDataEvent data.

Implements CatlikeCoding.EventSystem.IDragHandler.

void CatlikeCoding.Clipping.ClipBoxDragInput3D.OnPointerDown ( PointerEventData  eventData)

Called when pointer went down on this component.

Typically a mouse click or touch.

Parameters
eventDataEvent data.

Implements CatlikeCoding.EventSystem.IPointerDownHandler.

void CatlikeCoding.Clipping.ClipBoxDragInput3D.OnPointerUp ( PointerEventData  eventData)

Called on the same component that the pointer went down on, after it went up.

It's not called on the component that the pointer is currently on, if any.

Parameters
eventDataEvent data.

Implements CatlikeCoding.EventSystem.IPointerUpHandler.