Skip to main content

Type Alias: EntityProvider

type EntityProvider =
| {
name: string;
components: ComponentsManifest;
options: {
delete_on_client_disconnection?: boolean;
auto_broadcast?: boolean;
};
}
| {
name: string;
}
| Exclude<
FindEntityQuery,
{
names: string[];
}
>
| Entity;

Defined in: livelink.react/sources/hooks/useEntity.ts:64

A provider of an entity.

Type Declaration

{
name: string;
components: ComponentsManifest;
options: {
delete_on_client_disconnection?: boolean;
auto_broadcast?: boolean;
};
}
NameTypeDescription
namestringThe name of the entity.
componentsComponentsManifestThe components to attach to the entity with their initial values.
options{ delete_on_client_disconnection?: boolean; auto_broadcast?: boolean; }The creation options of the entity.
options.delete_on_client_disconnection?booleanWhether to delete the entity when the client disconnects.
options.auto_broadcast?booleanDeprecated Whether to broadcast the entity automatically.
{
name: string;
}
NameTypeDescription
namestringThe name of the entity to find.

Exclude<FindEntityQuery, { names: string[]; }>

Entity