Load Level in Final Release

how after exporting my game to make one of my levels main? So that after I launch the game the exact level that I need is opened?

Use the GameState and GameStateSamples gems. It loads up a main menu canvas which can be modified.

1 Like

create file in project folder
C:\Lumberyard\dev\GameProject\autoexec.cfg
with map commnad

map MyMainLevel
1 Like

This doesn’t work in release build

oh, then

		void OnSystemEvent(ESystemEvent systemEvent, UINT_PTR wparam, UINT_PTR lparam)
		{
			switch (systemEvent)
			{
			case ESYSTEM_EVENT_GAME_POST_INIT_DONE:
			{
				gEnv->pSystem->GetILevelSystem()->AddListener(this);

				if (!gEnv->IsEditor())
				{
					AzFramework::ConsoleRequestBus::Broadcast(&AzFramework::ConsoleRequestBus::Events::ExecuteConsoleCommand, "map test");
				}
			}
			break;
			default:
				break;
			}
		}
1 Like

can you tell where this program needs to be entered?

The GameStateSamples module I believe.

1 Like