Skip to content

@ue-too/ecs / index / createComponentName

関数: createComponentName()

createComponentName(name): symbol

定義: index.ts:234

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

パラメータ

name

string

The string name for the component

戻り値

symbol

A unique symbol for the component name

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