docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method HasValue

    HasValue(GameItem, StatDefinition)

    Determines if specified GameItem has a value for the specified StatDefinition.

    Declaration
    public static bool HasValue(GameItem gameItem, StatDefinition statDefinition)
    Parameters
    Type Name Description
    GameItem gameItem

    The GameItem to check for a stat.

    StatDefinition statDefinition

    StatDefinition this method is to act upon.

    Returns
    Type Description
    bool

    True if the specified GameItem has a value for the specified StatDefinition.

    Exceptions
    Type Condition
    ArgumentNullException

    If the gameItem argument is null.

    ArgumentNullException

    If the statDefinition argument is null.

    DetailNotFoundException

    If the StatDetail is not found.

    StatDefinitionNotFoundException

    If the StatDefinition is not found.

    HasValue(GameItem, string)

    Determines if specified GameItem has a value for the specified StatDefinition.

    Declaration
    public static bool HasValue(GameItem gameItem, string statDefinitionId)
    Parameters
    Type Name Description
    GameItem gameItem

    The GameItem to check for a stat.

    string statDefinitionId

    Id of StatDefinition this method is to act upon.

    Returns
    Type Description
    bool

    True if the specified GameItem has a value for the specified StatDefinition.

    Exceptions
    Type Condition
    ArgumentNullException

    If the gameItem argument is null.

    ArgumentException

    If the statDefinitionId is null or empty.

    DetailNotFoundException

    If the StatDetail is not found.

    StatDefinitionNotFoundException

    If the StatDefinition is not found.

    HasValue(string, StatDefinition)

    Determines if specified GameItem has a value for the specified StatDefinition.

    Declaration
    public static bool HasValue(string gameItemId, StatDefinition statDefinition)
    Parameters
    Type Name Description
    string gameItemId

    GameItem upon which StatManager is to check for stat.

    StatDefinition statDefinition

    StatDefinition this method is to act upon.

    Returns
    Type Description
    bool

    True if the specified GameItem has a value for the specified StatDefinition.

    Exceptions
    Type Condition
    ArgumentNullException

    If the statDefinition argument is null.

    ArgumentException

    If the gameItemId is null or empty.

    InventoryItemNotFoundException

    If the gameItemId is not found.

    DetailNotFoundException

    If the StatDetail is not found.

    StatDefinitionNotFoundException

    If the StatDefinition is not found.

    HasValue(string, string)

    Determines if specified GameItem has a value for the specified StatDefinition.

    Declaration
    public static bool HasValue(string gameItemId, string statDefinitionId)
    Parameters
    Type Name Description
    string gameItemId

    GameItem upon which StatManager is to check for stat.

    string statDefinitionId

    Id of StatDefinition this method is to act upon.

    Returns
    Type Description
    bool

    True if specified GameItem has specified Stat.

    Exceptions
    Type Condition
    ArgumentException

    If the gameItemId is null or empty.

    InventoryItemNotFoundException

    If the gameItemId is not found.

    ArgumentException

    If the statDefinitionId is null or empty.

    DetailNotFoundException

    If the StatDetail is not found.

    StatDefinitionNotFoundException

    If the StatDefinition is not found.

    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)