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.
Type Parameters
Section titled “Type Parameters”T
Parameters
Section titled “Parameters”defaultValue
Section titled “defaultValue”T
string
Returns
Section titled “Returns”ResourceDef<T>