docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method SetStatValue

    SetStatValue<T>(int, string, T, T, Completer)

    Request to create or update the stat item defined by the given ids.

    Declaration
    void SetStatValue<T>(int gameItemId, string statDefinitionId, T value, T defaultValue, Completer completer)
    Parameters
    Type Name Description
    int gameItemId

    Game item's id the stat item is connected to.

    string statDefinitionId

    Definition's Id the stat item is based on.

    T value

    Value to set to the stat item.

    T defaultValue

    Value used to reset the stat item.

    Completer completer

    The handle to settle the promise with.

    Type Parameters
    Name Description
    T

    Type of the stat. Supported types currently are:

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