Class StatItemSerializableData | Package Manager UI website
docs.unity.cn
    Show / Hide Table of Contents

    Class StatItemSerializableData

    Serializable data structure that contains the state of a StatItem.

    Inheritance
    System.Object
    StatItemSerializableData
    Namespace: UnityEngine.GameFoundation.DataPersistence
    Syntax
    [Serializable]
    public class StatItemSerializableData

    Constructors

    StatItemSerializableData()

    Default constructor for serialization purpose.

    Declaration
    public StatItemSerializableData()

    StatItemSerializableData(StatDictionarySerializableData.StatType, Int32, String, Object, Object)

    Basic constructor that take in the type of the value of the stat, the GameItem hash id of the stat, the definition id of the stat, the current value and the default value of the stat.

    Declaration
    public StatItemSerializableData(StatDictionarySerializableData.StatType type, int gameItemId, string definitionId, object value, object defaultValue)
    Parameters
    Type Name Description
    StatDictionarySerializableData.StatType type
    System.Int32 gameItemId
    System.String definitionId
    System.Object value
    System.Object defaultValue

    Properties

    defaultFloatValue

    The float value of the stat when StatDictionary type is a float.

    Declaration
    public float defaultFloatValue { get; }
    Property Value
    Type Description
    System.Single

    defaultIntValue

    The default int value of the stat when StatDictionary type is an int.

    Declaration
    public int defaultIntValue { get; }
    Property Value
    Type Description
    System.Int32

    definitionId

    The definition id of the stat.

    Declaration
    public string definitionId { get; }
    Property Value
    Type Description
    System.String

    floatValue

    The float value of the stat when StatDictionary type is a float.

    Declaration
    public float floatValue { get; }
    Property Value
    Type Description
    System.Single

    gameItemId

    The GameItem hash id of the stat.

    Declaration
    public int gameItemId { get; }
    Property Value
    Type Description
    System.Int32

    intValue

    The int value of the stat when StatDictionary type is an int.

    Declaration
    public int intValue { get; }
    Property Value
    Type Description
    System.Int32
    Back to top Copyright © 2019 Unity Technologies
    Generated by DocFX