Class GameItemDefinition
Base class for both BaseItemDefinition and BaseCollectionDefinition. Holds Id, dsplay name, etc., and allows DetailDefinitions to be attached as needed.
Implements
Inherited Members
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. |