Project Structure
Split your game over multiple modules.
These can coexist within Source/.
You could have modules such as:
| Name | Purpose |
|---|---|
Game |
Main game code |
GameEditor |
Editor code |
GameNative |
Engine/editor independent code |
GameNativeTests |
Tests for GameNative |
GameTests |
Tests for Game |
For GameNativeTests, I recommend using low level tests.
These run quickly and are run outside of the editor itself.
For GameTests, CQ tests (which build on the automation framework) are recommended.
These allow you to create levels for tests and can handle anything within the engine.
Low-level tests can compile against the engine and editor but I have had difficulty making it work well so I donβt recommend it.
Plugins
I recommend creating a game content plugin using something like Git LFS. This allows you to keep your content out of the main game module which can be left leaner. It also allows you to open-source your game without exposing paid content publicly.
A plugin for reusable code is also recommended.
Using CMake and Unreal with Visual Studio
If you have the Unreal development components installed in Visual Studio 2026, opening any directory with a .uproject file in Visual Studio will switch to Unreal mode. If this directory also has a CMakeLists.txt, it will be ignored, even if you directly open the CMake file itself.
The only solution I have found is to uninstall the Unreal components. Then you can open the .sln in one VS instance and the CMakeLists.txt in another.