The defined Actor Classes. More...
Inherits ScriptableObject.
Public Member Functions | |
void | UpdateCacheIfNeeded () |
Used to update the list of defined actor classes from the classFabs list. More... | |
void | UpdateCache () |
Used to update the list of defined actor classes from the classFabs list. More... | |
GameObject | GetPrefab (UniqueID id) |
Get Actor Class prefab by its Id. Return null if not found. More... | |
ActorClass | GetDefinition (UniqueID id) |
Get Actor Class definition by its Id. Return null if not found. More... | |
int | GetDefinitionIdx (UniqueID id) |
Get index of Actor Class in the actor classes list by its Id. Return -1 if not found. More... | |
string | GetScreenName (UniqueID id) |
Get the screen name of an actor class. Return "-invalid-" if not found. More... | |
string[] | GetNames () |
Returns a list of names of all defined actor classes. More... | |
Public Attributes | |
List< GameObject > | classFabs = new List<GameObject>() |
List if Actor Class prefabs. | |
List< ActorClass > | classes = new List<ActorClass>(0) |
List of defined classes. Should call UpdateCache() or UpdateCacheIfNeeded() before using this for first time. | |
Properties | |
static ActorClassesAsset | Instance [get] |
Provide access to asset at runtime More... | |
The defined Actor Classes.
ActorClass plyGame.ActorClassesAsset.GetDefinition | ( | UniqueID | id | ) |
Get Actor Class definition by its Id. Return null if not found.
int plyGame.ActorClassesAsset.GetDefinitionIdx | ( | UniqueID | id | ) |
Get index of Actor Class in the actor classes list by its Id. Return -1 if not found.
string [] plyGame.ActorClassesAsset.GetNames | ( | ) |
Returns a list of names of all defined actor classes.
GameObject plyGame.ActorClassesAsset.GetPrefab | ( | UniqueID | id | ) |
Get Actor Class prefab by its Id. Return null if not found.
string plyGame.ActorClassesAsset.GetScreenName | ( | UniqueID | id | ) |
Get the screen name of an actor class. Return "-invalid-" if not found.
void plyGame.ActorClassesAsset.UpdateCache | ( | ) |
Used to update the list of defined actor classes from the classFabs list.
void plyGame.ActorClassesAsset.UpdateCacheIfNeeded | ( | ) |
Used to update the list of defined actor classes from the classFabs list.
|
staticget |
Provide access to asset at runtime