Class EventTrigger
Implements
Inherited Members
Namespace: UnityEngine.EventSystems
Assembly: UnityEngine.UI.dll
Syntax
[AddComponentMenu("Event/Event Trigger")]
public class EventTrigger : MonoBehaviour, IPointerEnterHandler, IPointerExitHandler, IPointerDownHandler, IPointerUpHandler, IPointerClickHandler, IInitializePotentialDragHandler, IBeginDragHandler, IDragHandler, IEndDragHandler, IDropHandler, IScrollHandler, IUpdateSelectedHandler, ISelectHandler, IDeselectHandler, IMoveHandler, ISubmitHandler, ICancelHandler, IEventSystemHandler
Constructors
EventTrigger()
Declaration
protected EventTrigger()
Properties
triggers
All the functions registered in this EventTrigger
Declaration
public List<EventTrigger.Entry> triggers { get; set; }
Property Value
Type | Description |
---|---|
List<EventTrigger.Entry> |
Methods
OnBeginDrag(PointerEventData)
Called before a drag is started.
Declaration
public virtual void OnBeginDrag(PointerEventData eventData)
Parameters
Type | Name | Description |
---|---|---|
PointerEventData | eventData |
OnCancel(BaseEventData)
Called by the EventSystem when a Cancel event occurs.
Declaration
public virtual void OnCancel(BaseEventData eventData)
Parameters
Type | Name | Description |
---|---|---|
BaseEventData | eventData |
OnDeselect(BaseEventData)
Called by the EventSystem when a new object is being selected.
Declaration
public virtual void OnDeselect(BaseEventData eventData)
Parameters
Type | Name | Description |
---|---|---|
BaseEventData | eventData |
OnDrag(PointerEventData)
Called by the EventSystem every time the pointer is moved during dragging.
Declaration
public virtual void OnDrag(PointerEventData eventData)
Parameters
Type | Name | Description |
---|---|---|
PointerEventData | eventData |
OnDrop(PointerEventData)
Called by the EventSystem when an object accepts a drop.
Declaration
public virtual void OnDrop(PointerEventData eventData)
Parameters
Type | Name | Description |
---|---|---|
PointerEventData | eventData |
OnEndDrag(PointerEventData)
Called by the EventSystem once dragging ends.
Declaration
public virtual void OnEndDrag(PointerEventData eventData)
Parameters
Type | Name | Description |
---|---|---|
PointerEventData | eventData |
OnInitializePotentialDrag(PointerEventData)
Called by the EventSystem when a drag has been found, but before it is valid to begin the drag.
Declaration
public virtual void OnInitializePotentialDrag(PointerEventData eventData)
Parameters
Type | Name | Description |
---|---|---|
PointerEventData | eventData |
OnMove(AxisEventData)
Called by the EventSystem when a Move event occurs.
Declaration
public virtual void OnMove(AxisEventData eventData)
Parameters
Type | Name | Description |
---|---|---|
AxisEventData | eventData |
OnPointerClick(PointerEventData)
Called by the EventSystem when a Click event occurs.
Declaration
public virtual void OnPointerClick(PointerEventData eventData)
Parameters
Type | Name | Description |
---|---|---|
PointerEventData | eventData |
OnPointerDown(PointerEventData)
Called by the EventSystem when a PointerDown event occurs.
Declaration
public virtual void OnPointerDown(PointerEventData eventData)
Parameters
Type | Name | Description |
---|---|---|
PointerEventData | eventData |
OnPointerEnter(PointerEventData)
Called by the EventSystem when the pointer enters the object associated with this EventTrigger.
Declaration
public virtual void OnPointerEnter(PointerEventData eventData)
Parameters
Type | Name | Description |
---|---|---|
PointerEventData | eventData |
OnPointerExit(PointerEventData)
Called by the EventSystem when the pointer exits the object associated with this EventTrigger.
Declaration
public virtual void OnPointerExit(PointerEventData eventData)
Parameters
Type | Name | Description |
---|---|---|
PointerEventData | eventData |
OnPointerUp(PointerEventData)
Called by the EventSystem when a PointerUp event occurs.
Declaration
public virtual void OnPointerUp(PointerEventData eventData)
Parameters
Type | Name | Description |
---|---|---|
PointerEventData | eventData |
OnScroll(PointerEventData)
Called by the EventSystem when a new Scroll event occurs.
Declaration
public virtual void OnScroll(PointerEventData eventData)
Parameters
Type | Name | Description |
---|---|---|
PointerEventData | eventData |
OnSelect(BaseEventData)
Called by the EventSystem when a Select event occurs.
Declaration
public virtual void OnSelect(BaseEventData eventData)
Parameters
Type | Name | Description |
---|---|---|
BaseEventData | eventData |
OnSubmit(BaseEventData)
Called by the EventSystem when a Submit event occurs.
Declaration
public virtual void OnSubmit(BaseEventData eventData)
Parameters
Type | Name | Description |
---|---|---|
BaseEventData | eventData |
OnUpdateSelected(BaseEventData)
Called by the EventSystem when the object associated with this EventTrigger is updated.
Declaration
public virtual void OnUpdateSelected(BaseEventData eventData)
Parameters
Type | Name | Description |
---|---|---|
BaseEventData | eventData |