Rewired Glyphs Docs Rewired Glyphs Docs
Rewired Glyphs Docs Rewired Glyphs Docs
Rewired Glyphs

Search Results for

    Method GetSpecificCurrentGlyph

    GetSpecificCurrentGlyph(Player, int, Pole, out AxisRange, SymbolPreference, bool, string)

    Get a Glyph to represent an action for the user for the most recently used device.

    Declaration
    public static Glyph GetSpecificCurrentGlyph(this Player player, int actionID, Pole pole, out AxisRange axisRange, SymbolPreference symbolPreference, bool forceAxis = false, string collectionKey = null)
    Parameters
    Type Name Description
    Player player

    The player to evaluate for. This is relevant since different players are likely using different devices and maps.

    int actionID

    The integer ID for the action to evaluate.

    Integers are more efficient but consider using the following if you only have access to string names:

    int actionID = ReInput.mapping.GetActionId("your_action_string_here");
    Pole pole

    What is the polarity for the action?

    Pole.Positive is most common but you can expect Pole.Negative for inputs such as "Move Left" since that would be the negative side of a "Move Horizontal" axis.

    AxisRange axisRange

    The axis range that should be utilized in the output glyph.

    For elements that use axis input (sticks, mouse movement, etc.) we need to know direction of the element we want to display.

    For example: AxisRange.Positive would represent "Joystick Right". AxisRange.Negative would represent "Joystick Left", and AxisRange.Full would represent "Joystick Horizontal"

    SymbolPreference symbolPreference

    The preferred hardware symbol type to use for Joystick glyphs

    bool forceAxis

    Usually the Input Glyph system, when forceAxis is false, only checks for single axis inputs such that it will only look for "Move Left" with Pole.Negative and "Move Right" with Pole.Positive and thus never checking "Move Horizontal" as an axis itself.

    When true, explicitly request for the Input Glyph system to evaluate this glyph as the full axis ("Move Horizontal" in the example case) so we can represent it properly for axis inputs.

    TL;DR: For axis actions: True represents the axis itself "Move Horizontal". False represents negative pole "Move Left" and positive pole "Move Right". In most cases should be false.

    string collectionKey

    Optionally used for getting glyphs from a non-default glyph collection. Should match the value of Key

    Returns
    Type Description
    Glyph

    A Glyph that can be utilized in UI elements to display the element that is associated with this particular action.

    In cases where there is no element available this may return a "fallback" glyph

    Remarks

    This method should only be used if you want to explicitly determine the type of symbol (Xbox, Playstation, etc.) to show for the joystick glyph.
    Use GetCurrentGlyph(Rewired.Player,int,Rewired.Pole,out Rewired.AxisRange,bool, string) in the cases where you don't want to specify.

    GetSpecificCurrentGlyph(int, Pole, out AxisRange, SymbolPreference, int, bool, string)

    Declaration
    public static Glyph GetSpecificCurrentGlyph(int actionID, Pole pole, out AxisRange axisRange, SymbolPreference symbolPreference, int playerIndex = 0, bool forceAxis = false, string collectionKey = null)
    Parameters
    Type Name Description
    int actionID
    Pole pole
    AxisRange axisRange
    SymbolPreference symbolPreference
    int playerIndex
    bool forceAxis
    string collectionKey
    Returns
    Type Description
    Glyph
    Remarks

    This method should only be used if you want to explicitly determine the type of symbol (Xbox, Playstation, etc.) to show for the joystick glyph.

    Docs generated for Rewired-Glyphs Unity Package. Package distributed under MIT license.