Struct MouseButtonModel
Represents the state of a single mouse button within the uGUI system. Keeps track of various book-keeping regarding clicks, drags, and presses. Can be converted to and from PointerEventData for sending into uGUI.
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
Declaration
public void CopyFrom(PointerEventData eventData)
Parameters
Type | Name | Description |
---|---|---|
PointerEventData | eventData | These objects are used to send data through the uGUI system. |
CopyTo(PointerEventData)
Fills a
Declaration
public void CopyTo(PointerEventData eventData)
Parameters
Type | Name | Description |
---|---|---|
PointerEventData | eventData | These objects are used to send data through the 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()
Set's this object to it's default, unused state.
Declaration
public void Reset()