docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method TryGetIntValue

    TryGetIntValue(GameItem, string, out int)

    Tries to get specified Stat for specified GameItem and set out variable, if found.

    Declaration
    public static bool TryGetIntValue(GameItem gameItem, string statDefinitionId, out int value)
    Parameters
    Type Name Description
    GameItem gameItem

    GameItem upon which Stat is to be inspected.

    string statDefinitionId

    StatDefinition's Id to search for.

    int value

    Current value of Stat, if found for this GameItem.

    Returns
    Type Description
    bool

    True if specified Stat exists and is set on specified GameItem, else False.

    TryGetIntValue(GameItem, int, out int)

    Tries to get specified Stat for specified GameItem and set out variable, if found.

    Declaration
    public static bool TryGetIntValue(GameItem gameItem, int statDefinitionHash, out int value)
    Parameters
    Type Name Description
    GameItem gameItem

    GameItem upon which Stat is to be inspected.

    int statDefinitionHash

    StatDefinition's Hash to search for.

    int value

    Current value of Stat, if found for this GameItem.

    Returns
    Type Description
    bool

    True if specified Stat exists and is set on specified GameItem, else False.

    In This Article
    Back to top
    Copyright © 2024 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)