Core replaces a live description-registered Schema and migrates instances by field name (#75) #77
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
crowmaki/cinnabar#77
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Parent
#75
What to build
Re-registering a description-registered Schema under a name that is already registered replaces it while instances are live, per ADR-0020. Existing instances migrate through the serializer by field name: a kept field with a compatible Kind carries its value over, a kept field with an incompatible Kind resets to zero, a removed field is dropped, an added field is zero. GameObject and Component Object Ids and Component Handles survive, so references into a migrated Component still resolve. Replacing an Odin-registered Schema remains illegal and fails with a logged error.
This is the Core half of hot reload. It needs no Luau.
Acceptance criteria
engine_register_component_schemawith a name that names a description-registered Schema replaces it and returns the sameComponent_Typecomponent_is_alivestays true and reference fields still resolveBlocked by