IN THIS ARTICLE
Creating Projects on Windows
Use the instructions in this tutorial to create an O3DE project for the Windows host platform. You can create project directories either in the same directory as the O3DE root directory or outside of this directory. This documentation refers to the latter as “external projects”.
The following instructions assume that you have:
- Met all hardware and software requirements listed in O3DE System Requirements .
- Set up O3DE on your computer. For help, refer to Set up Open 3D Engine .
- Registered the O3DE engine in the O3DE manifest. If you set up O3DE from GitHub, you must manually register the engine. For help, refer to Register the engine .
This tutorial uses the following project name and directories in the examples. (Depending on how you set up O3DE, you might not have all of these directories.)
|O3DE engine source.|
|Installed O3DE engine, containing pre-built SDK engine binaries.|
|New project name and location.|
|Package directory, created earlier during setup .|
To start a project based on the standard template, complete the following steps.
Open a command line window and change to your O3DE engine directory by doing one of the following:
To create a new external project, use the
o3descript in the
create-projectcommand, used with the
project-pathand no other options, creates a new project using the standard template (the default project template). This command also registers the engine to the project in the project’s
scripts\o3de.bat create-project --project-path C:\o3de-projects\MyProject
Additionally, this command registers the project, adding it to the list of known projects in the O3DE manifest located in
<USER_DIRECTORY>/.o3de/o3de_manifest.json, and making Project Manager aware of your project.
Use CMake to create the Visual Studio project for your O3DE project.
Create the Visual Studio project in your new project directory. Supply the build directory, the Visual Studio generator, the path to the packages directory, and any other project options. Paths can be absolute or relative.
cd C:\o3de-projects\MyProject cmake -B build/windows_vs2019 -S . -G "Visual Studio 16" -DLY_3RDPARTY_PATH=C:\o3de-packagesNote:CMake unity builds are on by default. This is a CMake feature that can greatly improve build times by merging source files into single compilation units. If you encounter a build error, disabling unity builds might help debug the problem. To disable unity builds, run the previous
cmakecommand with the
-DLY_UNITY_BUILD=OFFargument to regenerate your project files.Caution:Do not use trailing slashes when specifying the path to the packages directory.
Use CMake to build the Visual Studio project in the build directory of your O3DE project.
Build the project launcher using the solution that you created in the project’s
build/windows_vs2019directory. The following example shows the
cmake --build build/windows_vs2019 --target MyProject.GameLauncher Editor --config profile -- -mImportant:When building the project for a pre-built SDK engine, even though you aren’t building O3DE Editor, we still highly recommend including
Editoras a build target. While the GameLauncher doesn’t depend on the Editor target, some Gems do. If you leave off the Editor target, those Gems aren’t included in the build.
When building the project for a source engine, you build the Asset Processor and Project Manager too, since they are dependencies of O3DE Editor.
-mis a recommended build tool optimization. It tells the Microsoft compiler (MSVC) to use multiple threads during compilation to speed up build times.
When the build is complete, you can find the project binaries in the project directory under
build/windows_vs2019/bin/profile. To verify that the project is ready to use, run O3DE Editor by doing one of the following:
If you set up your engine as a source engine , run the Editor from the project build directory.
build\windows_vs2019\bin\profile\Editor.exeNote:If your project build directory is outside the project path, you must include the project path (using the
--project-pathparameter) when launching O3DE Editor.
If you installed O3DE or built your engine as an SDK engine using the
INSTALLtarget, run the Editor from the installed engine’s build directory. (If you don’t supply the project path, Project Manager launches instead.) The project path can be absolute or relative to the engine directory.
C:\o3de-install\bin\Windows\profile\Default\Editor.exe --project-path C:\o3de-projects\MyProjectImportant:If you built the engine from source using the
INSTALLtarget, make sure that you launch the Editor and other tools from the installed engine’s build directory, not the engine’s build directory. The Windows install directory typically ends in
You can also run Project Manager (
o3de.exe) from the same directory to edit your project’s settings, add or remove Gems from the project, rebuild your project, and launch the Editor.
Caution:When you launch the Editor, the Asset Processor from the same directory will also launch. To launch the Editor from a different directory, you must close any Asset Processor tasks that are running.
Copyright © 2022 Open 3D Engine Contributors
Documentation Distributed under CC BY 4.0.
The Linux Foundation has registered trademarks and uses trademarks. For a list of trademarks of The Linux Foundation, please see our Trademark Policy page.