docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method SetIntValue

    SetIntValue(GameItem, string, int)

    Sets specified Stat on specified gameItem to a specific value.

    Declaration
    public static void SetIntValue(GameItem gameItem, string statDefinitionId, int value)
    Parameters
    Type Name Description
    GameItem gameItem

    GameItem upon which Stat is to be set.

    string statDefinitionId

    StatDefinition's Id to search for.

    int value

    New value of Stat to set for this GameItem.

    SetIntValue(GameItem, int, int)

    Sets specified Stat on specified gameItem to a specific value.

    Declaration
    public static void SetIntValue(GameItem gameItem, int statDefinitionHash, int value)
    Parameters
    Type Name Description
    GameItem gameItem

    GameItem upon which Stat is to be set.

    int statDefinitionHash

    StatDefinition's Hash to search for.

    int value

    New value of Stat to set for this GameItem.

    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)