Implementation:CARLA simulator Carla UE5 Setup And Build
| Knowledge Sources | |
|---|---|
| Domains | Build_System, Development |
| Last Updated | 2026-02-15 00:00 GMT |
Overview
Concrete tool for cloning, setting up, and building Unreal Engine 5 from CARLA's custom fork in the CARLA build pipeline.
Description
This implementation covers the complete process of acquiring and building CARLA's custom Unreal Engine 5 fork. The process consists of four commands executed sequentially: cloning the ue5-dev-carla branch from the CarlaUnreal GitHub repository, running the engine setup script to download third-party dependencies, generating build system project files, and compiling the engine with make.
The resulting build produces the UnrealEditor binary and all engine libraries needed by the CARLA Unreal project. The path to this engine installation is required by CARLA's CMake configuration step via the CARLA_UNREAL_ENGINE_PATH variable.
Usage
Execute these commands after installing system prerequisites and before configuring the CARLA CMake build. This step must be completed once per development machine. Re-running is only necessary when updating to a new CARLA Unreal Engine revision.
Code Reference
Source Location
- Repository: CARLA
- File:
CarlaSetup.sh:L98-126,Docs/build_linux_ue5.md:L171-194
Signature
# Step 1: Clone the CARLA Unreal Engine fork
git clone -b ue5-dev-carla https://github.com/CarlaUnreal/UnrealEngine.git ~/UnrealEngine5.3
# Step 2: Run engine setup, generate project files, and build
cd ~/UnrealEngine5.3
bash Setup.sh
bash GenerateProjectFiles.sh
make
I/O Contract
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
-b ue5-dev-carla |
Branch name | Yes | The CARLA-specific branch of the Unreal Engine fork. |
| Repository URL | URL | Yes | https://github.com/CarlaUnreal/UnrealEngine.git -- requires Epic Games linked GitHub account with organization access.
|
| Target directory | Path | No | Destination for the clone. Convention is ~/UnrealEngine5.3 but any path is valid.
|
| System prerequisites | System state | Yes | Build tools (gcc/clang, make), development libraries, and Vulkan SDK must be installed prior to running these commands. |
Outputs
| Name | Type | Description |
|---|---|---|
UnrealEditor binary |
Executable | The compiled Unreal Engine 5 editor binary, located at Engine/Binaries/Linux/UnrealEditor.
|
| Engine libraries | Shared objects | All compiled engine modules as .so files under Engine/Binaries/Linux/.
|
| Engine tools | Executables | Build tools including UnrealBuildTool, UnrealHeaderTool, ShaderCompileWorker. |
| Exit code | Integer | 0 on success for each step; non-zero indicates a failure requiring investigation.
|
Usage Examples
Basic Example
# Clone the CARLA Unreal Engine fork
git clone -b ue5-dev-carla https://github.com/CarlaUnreal/UnrealEngine.git ~/UnrealEngine5.3
# Enter the engine directory
cd ~/UnrealEngine5.3
# Download third-party dependencies
bash Setup.sh
# Generate Makefiles from UBT definitions
bash GenerateProjectFiles.sh
# Compile the engine (adjust -j flag to your CPU core count)
make -j$(nproc)
Setting the Engine Path for CARLA Build
# After a successful build, export the engine path for use by CARLA's CMake configuration
export UE5_ROOT=~/UnrealEngine5.3
# Verify the UnrealEditor binary exists
ls -la ~/UnrealEngine5.3/Engine/Binaries/Linux/UnrealEditor
Updating an Existing Engine Build
cd ~/UnrealEngine5.3
# Pull latest changes from the CARLA fork
git pull origin ue5-dev-carla
# Re-run setup in case new dependencies were added
bash Setup.sh
# Regenerate project files and rebuild
bash GenerateProjectFiles.sh
make -j$(nproc)