UltimateGamepadCursor
The UltimateGamepadCursor class is the main component of this Asset.
Last updated
Was this helpful?
The UltimateGamepadCursor class is the main component of this Asset.
Last updated
Was this helpful?
Important Note: The Ultimate Gamepad Cursor stores the first instance of the cursor for easy reference. This allows you to access all methods, events and properties by using this instance. However, you can also use a direct reference to the cursor if you are using multiple cursors in a single scene.
Enables the gamepad cursor so that it can be used.
Disables the gamepad cursor.
Called when an object has been hovered.
Called when an object has been exited.
Called when an object has been interacted with.
Called when the cursor has been enabled.
Called when the cursor has been disabled.
Instance
The current instance of the Ultimate Gamepad Cursor in the scene if there is one. (NOTE: When using multiple gamepad cursors, please use a public reference to the component instead.)
ParentCanvas
The parent Canvas component that this object is inside of.
ParentCanvasTransform
The RectTransform associated with the parent canvas.
ParentCanvasRaycaster
The Graphic Raycaster component attached to the parent canvas.
BaseTransform
The base RectTransform component of this object.
BaseImage
The base Image component of this object.
IsEnabled
Returns the current state of this component being enabled or disabled visually.
IsOverObject
Returns true if the cursor is over an object.
GetButtonDown
The state of the interact button being pressed this frame.
GetButtonUp
The state of the interact button being released this frame.
GetButton
The state of the interact button being pressed.
InputDirection
The current input value affecting the cursor.
MoveSpeed
The pixels per second that the cursor moves when at full speed.
CurrentMoveSpeedModifier
Returns the current move speed modifier depending on the transition from default to hovered defined by the user.
HoveredSpeedModifier
The modifier for the speed the cursor moves when an object is hovered.
DefaultColor
The default color of the base image.
HoveredColor
The hovered color of the base image.
MovementJoystick*
The movement joystick from the New Input System to use for moving the cursor.
InteractButton*
The interact button from the New Input System to use for interacting with objects in the scene.
HorizontalAxis
The horizontal axis of Unity input manager to use for the horizontal movement of the cursor.
VerticalAxis
The vertical axis of Unity input manager to use for the vertical movement of the cursor.
InteractButton
The interact button string value for Unity input manager.
*only available when the New Input System is used
This class handles all the additional images of the cursor. It has different options for scaling and rotating the images according to the current state of the cursor.