# How to open a level in plugin using cpp

**URL:** <https://forums.unrealengine.com/t/how-to-open-a-level-in-plugin-using-cpp/687205>\
**Category:** International\
**Tags:** level-editor, unreal-engine, plugin, question\
**Created:** [November 9, 2022, 10:00am UTC](https://forums.unrealengine.com/t/how-to-open-a-level-in-plugin-using-cpp/687205 "2022-11-09T10:00:53Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![NinjakusPerun](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@NinjakusPerun](https://forums.unrealengine.com/u/NinjakusPerun)\
**Post date:** [November 9, 2022, 10:00am UTC](https://forums.unrealengine.com/t/how-to-open-a-level-in-plugin-using-cpp/687205/1 "2022-11-09T10:00:53Z")

</div>

How do I open a new level using cpp in a pluging which extends UE5 editor. UGameplayStatics::OpenLevel does not work.

---

<div class="post-metadata">

**Author:** ![NinjakusPerun](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@NinjakusPerun](https://forums.unrealengine.com/u/NinjakusPerun)\
**Post date:** [November 18, 2022, 12:33pm UTC](https://forums.unrealengine.com/t/how-to-open-a-level-in-plugin-using-cpp/687205/2 "2022-11-18T12:33:56Z")

</div>

FEditorFileUtils::LoadMap(pathToLevel);  
Is the right answer
