Method GetComponentBoxed
GetComponentBoxed(Entity, ComponentType)
Gets the component object of a given entity
Declaration
public readonly object GetComponentBoxed(Entity entity, ComponentType type)
Parameters
| Type | Name | Description |
|---|---|---|
| Entity | entity | The entity |
| ComponentType | type | The component type to get the object of |
Returns
| Type | Description |
|---|---|
| Object | The component object |
Exceptions
| Type | Condition |
|---|---|
| ArgumentException | Throws if the type does not exist on the entity |
GetComponentBoxed(Entity, Type)
Gets the component object of a given entity based on the type
Declaration
public readonly object GetComponentBoxed(Entity entity, Type type)
Parameters
| Type | Name | Description |
|---|---|---|
| Entity | entity | The entity |
| Type | type | The type to get the object of |
Returns
| Type | Description |
|---|---|
| Object | The component object |
Exceptions
| Type | Condition |
|---|---|
| ArgumentException | Throws if the type does not exist on the entity |