Contents

SushiEngine::Simulation::IWorldEditor

read_component

virtual bool read_component(EntityId id, ComponentId component, std::byte *out, std::size_t size) const =0

Parameters

NameTypeDescription
idEntityId
componentComponentId
outstd::byte *

Receives size bytes; untouched on a refusal.

sizestd::size_t

The component's byte size; any other value refuses.

Returns

bool

False when the entity lacks the component or size is wrong.

Description

Copies the bytes of id's component into out.