Skip to content

GamepadIconsSet

Source: Assets/UpscaleSDK/Core/Input/Runtime/Glyphs/GamepadIconsSet.cs

class GamepadIconsSet

Represents a gamepad icons set class.

Properties

public Sprite DeviceImage

The controller silhouette drawn in the center of the layout view. Anchors on each glyph item are expressed in this image's normalized space (0..1, origin bottom-left) and are authored in the inspector.

Methods

public Sprite GetGlyph(GamepadGlyph glyph)

Gets the glyph.

Parameters

Name Description
glyph The glyph.

public bool TryGetGlyph(Sprite sprite, out GamepadGlyph glyph)

public Vector2 GetAnchor(GamepadGlyph glyph)

Returns the button's anchor in device image normalized space (0..1, origin bottom-left). Anchors are always considered placed; unauthored glyphs return (0, 0).