Skip to main content

Home > blockly > ComponentManager > getComponents

ComponentManager.getComponents() method

Gets all the components with the specified capability.

Signature:

getComponents<T extends IComponent>(capability: string | Capability<T>, sorted: boolean): T[];

Parameters

ParameterTypeDescription
capabilitystring | Capability<T>The capability of the component.
sortedbooleanWhether to return list ordered by weights.

Returns:

T[]

The components that match the specified capability.