docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class GameItemDefinition

    Base class for both BaseItemDefinition and BaseCollectionDefinition. Holds Id, dsplay name, etc., and allows DetailDefinitions to be attached as needed.

    Inheritance
    object
    Object
    ScriptableObject
    GameItemDefinition
    Implements
    ISerializationCallbackReceiver
    Inherited Members
    ScriptableObject.CreateInstance(string)
    ScriptableObject.CreateInstance(Type)
    ScriptableObject.CreateInstance<T>()
    Object.GetInstanceID()
    Object.GetHashCode()
    Object.Equals(object)
    Object.Instantiate(Object, Vector3, Quaternion)
    Object.Instantiate(Object, Vector3, Quaternion, Transform)
    Object.Instantiate(Object)
    Object.Instantiate(Object, Transform)
    Object.Instantiate(Object, Transform, bool)
    Object.Instantiate<T>(T)
    Object.Instantiate<T>(T, Vector3, Quaternion)
    Object.Instantiate<T>(T, Vector3, Quaternion, Transform)
    Object.Instantiate<T>(T, Transform)
    Object.Instantiate<T>(T, Transform, bool)
    Object.Destroy(Object, float)
    Object.Destroy(Object)
    Object.DestroyImmediate(Object, bool)
    Object.DestroyImmediate(Object)
    Object.FindObjectsOfType(Type)
    Object.DontDestroyOnLoad(Object)
    Object.FindObjectsOfType<T>()
    Object.FindObjectOfType<T>()
    Object.FindObjectOfType(Type)
    Object.ToString()
    Object.name
    Object.hideFlags
    Namespace: UnityEngine.GameFoundation
    Assembly: solution.dll
    Syntax
    public class GameItemDefinition : ScriptableObject, ISerializationCallbackReceiver

    Properties

    Name Description
    categories

    List of Category hashes assigned to this Game Item Definition

    displayName

    The name of this GameItemDefinition for the user to display.

    hash

    The Hash of this GameItemDefinition's Id.

    id

    The string Id of this GameItemDefinition.

    referenceDefinition

    The reference GameItemDefinition for this GameItemDefinition.

    Methods

    Name Description
    AddCategories(List<CategoryDefinition>)

    Adds the given Categories to this GameItemDefinition by list.

    AddCategory(CategoryDefinition)

    Adds the given Category to this GameItemDefinition.

    AddDetailDefinition<T>()

    This will add a DetailDefinition of specified type to this GameItemDefinition.

    Create(string, string)

    Creates a new GameItemDefinition by Id and displayName.

    GetCategories()

    Returns an array of all categories on this game item definition.

    GetCategories(List<CategoryDefinition>)

    Fills the given list with all categories on this game item definition.

    GetCategoryDefinition(int)

    Gets a CategoryDefinition from this GameItemDefinition categories with the following Hash

    GetDetailDefinition<T>(bool)

    This will return a reference to the requested DetailDefinition by type.

    GetDetailDefinitions()

    Returns an array of all detail definitions on this game item definition.

    HasCategoryDefinition(CategoryDefinition)

    Checks whether or not the given CategoryDefinition is within this GameItemDefinition.

    Initialize(string, string)
    OnAfterDeserialize()

    Called after serialization, this will pull out the DetailDefinition keys and values from the lists and store them into the main dictionary.

    OnBeforeSerialize()

    Called before serialization, this will copy over all keys and values from the DetailDefinitions dictionary into their serializable lists.

    RemoveCategory(CategoryDefinition)

    Removes the given Category from this GameItemDefinition.

    RemoveDetailDefinition<T>()

    Remove the requested DetailDefinition by type from this GameItemDefinition.

    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)