Struct MouseButtonModel
Represents the state of a single mouse button within the Unity UI (UGUI) system. Keeps track of various book-keeping regarding clicks, drags, and presses. Can be converted to and from PointerEventData for sending into Unity UI (UGUI).
Inherited Members
Namespace: UnityEngine.XR.Interaction.Toolkit.UI
Syntax
public struct MouseButtonModel
Properties
isDown
Used to store the current binary state of the button. When set, will also track the changes between calls of OnFrameFinished() in UnityEngine.XR.Interaction.Toolkit.UI.MouseButtonModel.lastFrameDelta.
Declaration
public bool isDown { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
Methods
CopyFrom(PointerEventData)
Fills this object with the values from a PointerEventData.
Declaration
public void CopyFrom(PointerEventData eventData)
Parameters
Type | Name | Description |
---|---|---|
PointerEventData | eventData | These objects are used to send data through the Unity UI (UGUI) system. |
CopyTo(PointerEventData)
Fills a PointerEventData with this mouse button's internally cached values.
Declaration
public void CopyTo(PointerEventData eventData)
Parameters
Type | Name | Description |
---|---|---|
PointerEventData | eventData | These objects are used to send data through the Unity UI (UGUI) system. |
OnFrameFinished()
Call this on each frame in order to reset properties that detect whether or not a certain condition was met this frame.
Declaration
public void OnFrameFinished()
Reset()
Resets this object to it's default, unused state.
Declaration
public void Reset()