docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method AdjustFloatValue

    AdjustFloatValue(GameItem, string, float)

    Adjusts specified Stat on specified gameItem by specified amount.

    Declaration
    public static float AdjustFloatValue(GameItem gameItem, string statDefinitionId, float change)
    Parameters
    Type Name Description
    GameItem gameItem

    GameItem upon which Stat is to be adjusted.

    string statDefinitionId

    StatDefinition's Id to change.

    float change

    Adjustment (positive or negative) to Stat.

    Returns
    Type Description
    float

    The new value of Stat on GameItem.

    AdjustFloatValue(GameItem, int, float)

    Adjusts specified Stat on specified gameItem by specified amount.

    Declaration
    public static float AdjustFloatValue(GameItem gameItem, int statDefinitionHash, float change)
    Parameters
    Type Name Description
    GameItem gameItem

    GameItem upon which Stat is to be adjusted.

    int statDefinitionHash

    StatDefinition's Hash to change.

    float change

    Adjustment (positive or negative) to Stat.

    Returns
    Type Description
    float

    The new value of Stat on 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)