Check if level exists

I’m encountering an issue where unreal.EditorAssetSubsystem.does_asset_exist(asset_path) doesn’t seem effective for checking the existence of levels (.umap files).
I aim to skip over levels that already exist to prevent overwriting them during script execution.
Is there an alternative method or workaround specifically for levels that would accurately check if they exist already?

I think you should be using unreal.EditorLevelUtils or unreal.EditorLevelLibrary instead.

https://docs.unrealengine.com/5.3/en-US/PythonAPI/class/EditorLevelUtils.html#unreal.EditorLevelUtils.get_levels

Thank you for your reply. I believe unreal.EditorLevelLibrary has been deprecated.
get_levels returns the levels in a World, what I’d need is a way to check if a level asset already exists in a folder path.