Skip to content

createBundle crashes running game and editor #45

Description

@AdrianJMartin

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() );

             });
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions