getComponent

ECSInterface::getComponent

Returns an Entity’s Component.

Declaration

template <typename T>
T& getComponent(Entity entity);

Parameters

Name

Type

Description

entity

Entity

The Entity to get the Component from.

Returns

A const reference to the Component whose type has been passed in template.

Notes

The type of the Component to get must be passed as a template.