docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method SetFloatValue

    SetFloatValue(GameItem, string, float)

    Sets specified Stat on specified gameItem to a specific value.

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

    GameItem upon which Stat is to be set.

    string statDefinitionId

    StatDefinition's Id to search for.

    float value

    New value of Stat to set for this GameItem.

    SetFloatValue(GameItem, int, float)

    Sets specified Stat on specified gameItem to a specific value.

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

    GameItem upon which Stat is to be set.

    int statDefinitionHash

    StatDefinition's Hash to search for.

    float 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)