I suspect its in the factory lambda...tested by commenting out the the code in .doriax and running, button event then no longer crashes out, but obviously does not rehydrate the package
button in ui sub scene....
button_aScript::button_aScript(Scene *scene, Entity entity) : Button(scene, entity)
{
REGISTER_ENGINE_EVENT(onUpdate);
getComponent<ButtonComponent>()
.onPress
.add("pressed", [&]()
{
Log::print("Button pressed!");
for (auto bundleName : BundleManager::getBundleNames())
{
Log::print(bundleName.c_str());
}
auto main_scene = Engine::getMainScene();
Entity falling_block_root = main_scene->findEntity("falling_block_root");
std::stringstream ss;
ss << "Entity: " << falling_block_root;
Log::print( ss.str().c_str() );
auto e = BundleManager::createBundle( "falling_block" , scene , falling_block_root);
ss.str("");
ss << "Entity: " << falling_block_root;
Log::print( ss.str().c_str() );
});
}
I suspect its in the factory lambda...tested by commenting out the the code in .doriax and running, button event then no longer crashes out, but obviously does not rehydrate the package
button in ui sub scene....