You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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)
Instead of having a lot of metadata in the prefab vars decl that will not work when wanting to do custom things, the idea is instead to be able to declare things very briefly in edit():
Currently the prefab system is a bit hard to work with because of the factory model:
I propose we change the following:
Ping @trethaller @D0pu for comments
The text was updated successfully, but these errors were encountered: