Class PointerInputModule.MouseState
Tracks the state of every mouse button that the input module processes.
Inherited Members
Namespace: UnityEngine.EventSystems
Assembly: UnityEngine.UI.dll
Syntax
protected class PointerInputModule.MouseState
Methods
AnyPressesThisFrame()
Checks whether any tracked mouse button was pressed this frame.
Declaration
public bool AnyPressesThisFrame()
Returns
| Type | Description |
|---|---|
| bool | True if at least one tracked button was pressed this frame. |
AnyReleasesThisFrame()
Checks whether any tracked mouse button was released this frame.
Declaration
public bool AnyReleasesThisFrame()
Returns
| Type | Description |
|---|---|
| bool | True if at least one tracked button was released this frame. |
GetButtonState(InputButton)
Returns the tracked state of a mouse button, and starts tracking the button if it isn't tracked yet.
Declaration
public PointerInputModule.ButtonState GetButtonState(PointerEventData.InputButton button)
Parameters
| Type | Name | Description |
|---|---|---|
| PointerEventData.InputButton | button | The mouse button. |
Returns
| Type | Description |
|---|---|
| PointerInputModule.ButtonState | The state of the given mouse button. |
SetButtonState(InputButton, FramePressState, PointerEventData)
Sets the press state and the pointer data of a mouse button for this frame.
Declaration
public void SetButtonState(PointerEventData.InputButton button, PointerEventData.FramePressState stateForMouseButton, PointerEventData data)
Parameters
| Type | Name | Description |
|---|---|---|
| PointerEventData.InputButton | button | The mouse button. |
| PointerEventData.FramePressState | stateForMouseButton | The press state of the button for this frame. |
| PointerEventData | data | The pointer event data of the button for this frame. |