Skip to content

defineResource

defineResource<T>(defaultValue, name?): ResourceDef<T>

Defined in: ecs/resource.ts:40

Declare a resource: one value the whole world shares, addressed by the definition rather than by a name. name is for diagnostics and the editor only — two calls answer two distinct resources however they are named.

T

T

string

ResourceDef<T>