EntMain
Main
Main Entity Component, storing name and other core data
ID: EntMain
Base Type: Entity Component
Values
Name | Type | Description |
---|---|---|
Name | Text Variable | |
Entity Disabled | Bool Variable | |
MB Prefab | Entity Prefab Asset Variable | Prefab this Entity is using - - ReadOnly |
Tags | Text Variable List | List of tags added to the Entity |
Added Components | Entity Component Type Variable List | List component types that have been added to the Entity - - ReadOnly |
Removed Components | Entity Component Type Variable List | List component types removed from the Entity that were on it's Asset |
Methods
Name | Description |
---|---|
All Components | Entity Component List |
Owned By | Client |
Controlled By | Client |
Has Tag | Bool |
Remove Component Type | |
Add Component | |
Remove Entity() | Removes the entity from the world |
Turn On Playmode() | |
Die() | Kills the entity (break apart / ragdoll) |
Refresh Values() | Runs RefreshValues event which components can use to refresh their values |
Reset All Values() | Resets the values all components to their prefab or default value |
Reset Values On(MB Type Entity Component component) | Resets the values on a given component type to their prefab or default value |
Play Audio(Audio Clip clip) | Play Audio on Entity. Sound will follow Entity will stop last audio played |
Properties
Name | Type | Description |
---|---|---|
Asset | Entity Asset | Asset this Entity was created from |
Asset Tags | Text List | Tags on the Asset this Entity was created from |
In Play Mode | Bool | |
Ent ID | Whole Number | |
Is Local Only Entity | Bool | |
Is Disabled In Hierarchy | Bool | Entity is Disabled or a parent is Disabled |
Is Dead | Bool | |
Using Prefabs | MB Prefab Instance List |
Events
Name | Description |
---|---|
Awake() | Ran after the Entity is created before starting play mode |
Start() | Ran when the Entity starts in play mode |
Update() | Ran between 5-10 times a second |
Update Second() | Ran at near every second |
Enabled In Hierarchy() | Ran when the Entity is enabled |
Disabled In Hierarchy() | Ran when the Entity is disabled |
Refreshed Values() | Ran by components to clear values / refresh state. Also ran after components are added/removed |
Removed() | Ran when Entity is removed |
On Death() | Ran when Entity dies |
Attributes:
ModboxMain.MBTypeComponentNoIngameAddingAttribute
Updated almost 2 years ago