# Make testplay start at Default Map?

**URL:** <https://forums.unrealengine.com/t/make-testplay-start-at-default-map/589999>\
**Category:** Getting Started & Setup\
**Tags:** play-in-editor, unreal-engine, multiplayer-testing, UE5-0, editor, question\
**Created:** [June 25, 2022, 10:27am UTC](https://forums.unrealengine.com/t/make-testplay-start-at-default-map/589999 "2022-06-25T10:27:55Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![BDC\_Patrick](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/bdc_patrick/32/1104221_2.png) [@BDC\_Patrick](https://forums.unrealengine.com/u/BDC_Patrick)\
**Post date:** [June 25, 2022, 10:27am UTC](https://forums.unrealengine.com/t/make-testplay-start-at-default-map/589999/1 "2022-06-25T10:27:56Z")

</div>

Hi there…

I´m not new to Unreal and got much experienced with the Engine… and the Editor…  
But in my Years i never figured this out…

I´ve two Maps.  
00\_Debugging  
01\_Main

In the project Preferences, i set:  
 ![01](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/9/e/e9ee37037fd964c45157a38ad24e74782b35e360.png)

Which opens the Debugging level when i start the Unreal Editor… and my Standalone Game starts at the Main Map.

And there is the problem… Those are the only two Options…

Now… in the Editor we have this nice Button set:  
 ![02](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/5/7/457705c938f5969e0d6711419efcbca9344412ec.png)

And this… is the annyoing Part… When you Hit the Testplay here, option for new PIE Window checked… networking in standalone, it only starts the current opened level…  
But… that´s a problem if you need to Debug some things on one map… but need to do Network Create/Find/Join Session, after changing ingame settings in the main menu…  
You always need to switch from debugging to main to debugging to main…etc… cause there seems no option to make the Editor Testplay start the Default Standalone Startup Map…

Do you now how to deal with that…? I mean… make testplay always start at a specific Level, instead of the currently loaded one?

---

<div class="post-metadata">

**Author:** ![Fulezi](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/fulezi/32/813318_2.png) [@Fulezi](https://forums.unrealengine.com/u/Fulezi)\
**Post date:** [August 18, 2023, 1:22pm UTC](https://forums.unrealengine.com/t/make-testplay-start-at-default-map/589999/2 "2023-08-18T13:22:28Z")

</div>

I use a Cheat Code (or console command) that lets me restart the game. When I want to test play, I begin on the current map and then trigger the cheat code.

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/a/7/2a76f24de20de420e4b69fd1cd31fe7657398715.png)

Here is the C++ code:

```auto
class THEPATHTOL0_API UL0CheatManager : public UCheatManager
{
	UFUNCTION(Exec)
	void L0CheatRestartGame();
};

void UL0CheatManager::L0CheatRestartGame()
{
	UGameMapsSettings const* GameMapsSettings = UGameMapsSettings::GetGameMapsSettings();
	if (ensure(GameMapsSettings))
	{
		const FString DefaultMapName = GameMapsSettings->GetGameDefaultMap();
		UGameplayStatics::OpenLevel(this, FName(*DefaultMapName));
	}
}

```

This approach offers an added benefit: during events or when packaging the game, I can easily restart it if any bugs arise.

While you can opt for a key-based approach, I find cheat codes more convenient. They’re easier to autocomplete and provide endless possibilities.

Note: I’ve implemented a variety of cheat codes for testing, including ‘SkipOnboarding,’ ‘SetPlayerLevel,’ and ‘GiveEquipment.’ These codes are incredibly convenient for enhancing gameplay and diagnosing issues

---

<div class="post-metadata">

**Author:** ![BDC\_Patrick](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/bdc_patrick/32/1104221_2.png) [@BDC\_Patrick](https://forums.unrealengine.com/u/BDC_Patrick)\
**Post date:** [August 24, 2023, 11:32am UTC](https://forums.unrealengine.com/t/make-testplay-start-at-default-map/589999/3 "2023-08-24T11:32:12Z")

</div>

I´ve done a Cheat system with Blueprints for now…

On BeginPlay… the PlayerController checks if a Started Switch in the GameInstance is true…

If false… it Opens the Start Level, which then sets the Switch to true…

If already true… it just proceeds with the PlayerController Stuff…

So… each time the PC gets spawned, it asks if the Game started at the Start Map via that Switch… and if not… teleports to that…
