API Reference › Reflect › Reflect.apply
method

Reflect.apply

Reflect.apply(entity, value) -> int

The inverse of Reflect.serialize: writes the fields of a value-tree value back into a live entity, and returns how many were set. Only components the entity already has and fields the schema knows are applied; reserved "@"-keys (like "@kind") and unknown names are skipped, so a partial or older save loads cleanly. Feed it the output of Json.parse to load a save.

← All symbols