Method GetAspect
GetAspect<T>(Entity)
Look up an aspect for an entity.
Declaration
public static T GetAspect<T>(Entity entity) where T : unmanaged, IAspect
Parameters
Type | Name | Description |
---|---|---|
Entity | entity | The entity. |
Returns
Type | Description |
---|---|
T | An aspect struct of type T representing the aspect on the entity. |
Type Parameters
Name | Description |
---|---|
T | The type of aspect to retrieve. |
Remarks
T must implement the IAspect interface. The given entity is assumed to have all the components required by the aspect type.