# does\_asset\_exist for Levels

**URL:** <https://forums.unrealengine.com/t/does-asset-exist-for-levels/1775935>\
**Category:** Programming & Scripting\
**Tags:** Python, unreal-engine, Levels, question\
**Created:** [March 28, 2024, 12:17pm UTC](https://forums.unrealengine.com/t/does-asset-exist-for-levels/1775935 "2024-03-28T12:17:36Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![stef\_bracke](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@stef\_bracke](https://forums.unrealengine.com/u/stef_bracke)\
**Post date:** [March 28, 2024, 12:17pm UTC](https://forums.unrealengine.com/t/does-asset-exist-for-levels/1775935/1 "2024-03-28T12:17:36Z")

</div>

In a Python script I am creating levels. Upon rerunning the script I’d like to check for existing levels to avoid overwriting.  
`unreal.EditorAssetLibrary.does_asset_exist()` and `unreal.EditorAssetSubsystem.does_asset_exist()` don’t appear to work for levels (according to documentation) but are not providing an alternative.

What would be an alternative command, if any?

---

<div class="post-metadata">

**Author:** ![Patrick.O](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/patrick.o/32/1007161_2.png) [@Patrick.O](https://forums.unrealengine.com/u/Patrick.O)\
**Post date:** [May 31, 2024, 8:16pm UTC](https://forums.unrealengine.com/t/does-asset-exist-for-levels/1775935/2 "2024-05-31T20:16:49Z")

</div>

Yeah, I’m not sure why `does_asset_exist()` doesn’t work for levels. Seems dumb. This was my workaround:

```auto
if unreal.load_object(None, "/Game/Maps/MyMap.MyMap"):
          [My Code]
else:
          print("No map found!")

```
