Contents

SushiEngine::Simulation::IWorldEditor

write_component

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

Parameters

NameTypeDescription
idEntityId
componentComponentId
valueconst std::byte *

The component's bytes; a null pointer refuses.

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

Overwrites id's component with size bytes from value.