UltimateGamepadCursor

The UltimateGamepadCursor class is the main component of this Asset.

Method
Description

Enables the gamepad cursor so that it can be used.

Disables the gamepad cursor.

Event
Description

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.

Property
Description

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

Class Name
Description

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.

Last updated

Was this helpful?