The instructions on this page are for running the engine with projects compiled in a Development build configuration. You can substitute the UE4Editor-_.exe or UE4-_.exe that you need for opening projects built in other configurations. More information on the binary naming convention can be found on the Building Unreal Engine page.
The instructions on this page are for running the engine with projects compiled in a Development build configuration. You can substitute the UE4Editor-_.app or UE4-_.app that you need for opening projects built in other configurations. More information on the binary naming convention can be found on the Building Unreal Engine page.
Running the Editor
The process of running the editor simply requires passing the name of the project to run as an argument to the executable.
You can add the -debug switch to force the executable to load the debug version of the modules for your project, which contain all of the debugging symbols. This is necessary even when debugging through Xcode with the configuration set to Debug because the main executable is always compiled using the Development configuration. Of course, you must first compile your modules using the Debug configuration so they exist for the executable to load.
The process of running the editor simply requires passing the name of the project to run as an argument to the executable.
You can add the -debug switch to force the executable to load the debug version of the modules for your project, which contain all of the debugging symbols. This is necessary even when debugging through Visual Studio with the configuration set to Debug because the main executable is always compiled using the Development configuration. Of course, you must first compile your modules using the Debug configuration so they exist for the executable to load.
Running the Editor from the Command Line
From a command prompt, navigate to your [LauncherInstall]/[VersionNumber]/Engine/Binaries/Mac directory.
Run the UE4Editor.app passing it the path to your project:
open UE4Editor.app --args "[ProjectPath]/[ProjectName].uproject"
From a command prompt, navigate to your [LauncherInstall][VersionNumber]\Engine\Binaries\Win64 directory.
Run the UE4Editor.exe, passing it the path to your project.
From a command prompt, navigate to your [LauncherInstall][VersionNumber]/Engine/Binaries/Mac directory.
Run the UE4Editor.app passing it the path to the project to run, along with the -game parameter
open UE4Editor.app --args "[ProjectPath]/[ProjectName].uproject" -game
Running an Uncooked Game from the Executable
When running from the executable, you must specify the path to the project you want to run along with the -game switch as arguments to the executable via the Target property of a shortcut.
Navigate to your [LauncherInstall][VersionNumber]\Engine\Binaries\Win64 directory.
Right-click on the UE4Editor.exe executable and choose Create shortcut.
Rename the shortcut to reflect the game it will run, i.e. MyProject.exe.
Right-click on the newly created shortcut and choose Properties to display the properties of the shortcut.
Add the full path to the project to run as an argument at the end of the Target property, and specify the -game argument to run as a game:
See Packaging Projects for information on how to package and run cooked game builds
Useful In-Game Commands
When you are running the game, there are a multitude of console commands you can use in the console inside the game. The console can be summoned by pressing the ~ (tilde) or Tab keys. Some of the most useful commands are listed below.
EXIT/QUIT
DISCONNECT
OPEN [MapURL]
TRAVEL [MapURL]
VIEWMODE [Mode]
Loading Maps
It is possible to specify a particular map to load when running the engine or editor or load a new map while running the engine. This can be useful for testing by quickly jumping into the map you want to test without needing to make your way through a series of menus.
Loading Maps at Startup
The engine will always attempt to load a default map when it is run. This map is specified in the DefaultEngine.ini config file located in the Config folder of your game project. The map to run by default is set using the Map property in the [URL] section of the .ini file. As an example, Vehicle Game has the following in its DefaultEngine.ini file:
Map=/Game/Maps/VehicleMenu
This will cause the VehicleMenu.umap (located in [UE4Directory]/VehicleGame/Content/Maps) to load at startup unless it is overridden. Generally, you will want to specify the map that loads or is used as the background for your main menu as the default map.
To override the default map, you can pass in a map name (without the file extension) as a command line argument. It was mentioned previously that you must specify the project name on the command line. Following these, you can also specify a map name to force the engine to load a map other than the default. For instance, the following command line could be used to load the engine running the ExampleMap map:
open UE4Editor.app --args "[ProjectPath]/[ProjectName].uproject" ExampleMap -game
To override the default map, you can pass in a map name (without the file extension) as a command line argument. It was mentioned previously that you must specify the project name on the command line. Following these, you can also specify a map name to force the engine to load a map other than the default. For instance, the following command line could be used to load the engine running the ExampleMap map:
The same concept works when running the editor. Specifying the name of the map to load will load that map when the editor opens instead of the default or blank map. To load the editor with the ExampleMap map loaded, the following command line can be used:
open UE4Editor.app --args "[ProjectPath]/[ProjectName].uproject" ExampleMap
The map name can also be a full map URL specifying additional settings such as the GameMode. Settings are appended to the map name as key-value pairs separated by a ?. For example:
DM-Deck?Game=CaptureTheFlag
Loading New Maps
If you want to load a new map during play, in order to test during development or even to switch maps during gameplay, this can be done using the OPEN or TRAVEL console commands followed by the name of the map (without the file extension) to load.
The difference between the OPEN and TRAVEL commands is described above in the Useful In-Game Commands section.
The commands below load the DM-Deck map during play with the same settings or settings reset, respectively:
open DM-Deck
Or
travel DM-Deck
Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.