Contains the defined Items. More...
Inherits ScriptableObject.
Public Types | |
enum | StorageMethod { Unlimited, Weight, Slots } |
Public Member Functions | |
bool | UpdateItemCache () |
Item | GetDefinition (UniqueID id) |
Get definition by its Id. Return null if Id is invalid or definition not found. More... | |
Item | GetDefinition (string ident, plyGameObjectIdentifyingType identType) |
Get the defined by its name, custom def.ident or def.meta data. Return null if not found. More... | |
int | GetDefinitionIdx (UniqueID id) |
Get an definition's index in the list by Id. Return -1 if not found. More... | |
string | GetScreenName (UniqueID id) |
Return the screen name of an definition. Return "-invalid-" if not found. More... | |
string[] | GetNames () |
Returns a list of names of all defined items. More... | |
Public Attributes | |
List< GameObject > | itemFabs = new List<GameObject>() |
List of all defined item prefabs. | |
List< Item > | items = new List<Item>(0) |
Runtime access to defined Items. | |
StorageMethod | storageMethod = StorageMethod.Weight |
float | autoPickItemDisableDistance = 20f |
items that can be auto picked up is disabled when further than this from player | |
List< ItemType > | itemTypes = new List<ItemType>(1) |
The defined Item Types. | |
List< string > | equipSlots = new List<string>(1) |
The defined Equip Slots names. | |
bool | runtimeCreatedItemsPersist = true |
Should Items created at runtime be restored after scene changes? | |
Properties | |
static ItemsAsset | Instance [get] |
Provide access to asset at runtime More... | |
Contains the defined Items.
Get definition by its Id. Return null if Id is invalid or definition not found.
Item plyGame.ItemsAsset.GetDefinition | ( | string | ident, |
plyGameObjectIdentifyingType | identType | ||
) |
Get the defined by its name, custom def.ident or def.meta data. Return null if not found.
int plyGame.ItemsAsset.GetDefinitionIdx | ( | UniqueID | id | ) |
Get an definition's index in the list by Id. Return -1 if not found.
string [] plyGame.ItemsAsset.GetNames | ( | ) |
Returns a list of names of all defined items.
string plyGame.ItemsAsset.GetScreenName | ( | UniqueID | id | ) |
Return the screen name of an definition. Return "-invalid-" if not found.
|
staticget |
Provide access to asset at runtime