-
Notifications
You must be signed in to change notification settings - Fork 69
Open
Description
Currently the prefab system is a bit hard to work with because of the factory model:
- some prefabs does have a member variable referencing their scene object, so they won't work in multiple references
- it is difficult to deal with the Context API, because you can't store all per-instances variables you might want
- serialization of fields is done by hand (load/save)
- modifying prefab data at runtime lead to this data being modified for later instances
I propose we change the following:
- each prefab have serialization through macros (@:s) + custom save/load if needed
- when doing make, we clone() the prefab then makeInstance the clone, so we keep the original "factory" prefab untouched but the instantiated one will hold a reference to the scene object (it be its own Context).
- remove Context (or actually ContextShared become Context)
Ping @trethaller @D0pu for comments
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels