HeliumProject / Engine

C++ Game Engine (Under Construction!)
http://heliumproject.org/
Other
442 stars 70 forks source link

Asset objects should be shallow copied by default #66

Closed gorlak closed 10 years ago

gorlak commented 10 years ago

SpriteComponentDefinition::PopulateMetaType has to mark m_Texture as FieldFlags::Share to prevent the Texture2d Asset it references from getting cloned. We need to figure out some way to systematically prevent Cloning Assets from cloning the assets they reference via reflection-aware pointer field.

Perhaps we could add a Identifier/Resolver style interface to the cloning API, or maybe stash some data in the StrongPtr template class that gets extracted during reflection initialization.