Editor BP - Load Map - Engine Crashes

When I try to use Load Map inside a Editor Utility Widget the Engine crashes.
The idea is to allow the user to select the Level using a drop down and load the selected level.

The async load asset works and I get a valid asset Path.

This is the error when I try to call Load Map with the Loaded Asset Path:


image

error:
Assertion failed: !LevelList.Contains(TickTaskLevel) [File:D:\build++UE5\Sync\Engine\Source\Runtime\Engine\Private\TickTaskManager.cpp] [Line: 1458]

I’m not really sure if this is a Bug or something is wrong with my Logic.
Thank you,

I believe you have to cast to the loaded object after Async load asset node if I am not mistaken.

Thank you for the idea. But I don’t think that is the problem, because the path to the loaded asset is valid. The string indeed points to where the map lives in the Project Content Browser.

Moreover, following your idea, cast to what type?

Interesting, normally with soft objects you would cast to the class that you are trying to load. So in this case it would be the UWorld class, but it wont let me make an variable type for it so there must be something up with it that is restricted in bp. I did see a load level instance by object reference that might help but if the return on get path name is valid I’m really not sure what’s going on.

Sure thing. Thanks anyway!
I reported it as Bug issue. (it seems like a bug, considering the path is correct).
It is not urgent on my side, so I’ll try to experiment other ways.
I’ll post fix or solution here if I find some.

I don’t think you’re supposed to load the map as an asset before loading it as a map. iirc there is a node to load map by soft world ref, or alternatively converting the soft ref to string should be equivalent to level name.

This makes sense and it worked!
I removed the async load and got the path from the soft world reference.
Load Map works fine now.

Thank you.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.