Skip to content

@ue-too/ecs / createComponentName

Function: createComponentName()

createComponentName(name): symbol

Defined in: index.ts:234

Helper function to create a component name from a string. This creates a unique symbol for the component name.

Parameters

name

string

The string name for the component

Returns

symbol

A unique symbol for the component name

Example

typescript
const Position = createComponentName('Position');
coordinator.registerComponent<Position>(Position);