1. Installation

1.1. Installing using the Epic Games Launcher

  • In the Marketplace section of the Epic Games Launcher, find the AGX Dynamics for Unreal plugin and select Install To Engine.

  • Use your license to enable AGX Dynamics for Unreal, see Licensing for details.

To be able to use the AGX Dynamics for Unreal plugin in an Unreal Engine project, it needs to be enabled for that project. This can be done by selecting Top Menu Bar > Edit > Plugins > AGX Dynamics for Unreal and checking the Enabled checkbox. Restart Unreal Editor for the changes to take effect. The plugin is now ready to be used.

1.2. Install or build using a .zip file release

AGX Dynamics for Unreal comes in various forms intended for different use cases. Each package is named according to the following pattern:

AGXUnreal-<VERSION>_UE-<UE_VERSION>_AGX-<AGX_VERSION>_<VARIANT>.zip
  • <VERSION> is the version of AGX Dynamics for Unreal that the package contains, for example 1.0.

  • <UE_VERSION> is the earliest two-part Unreal Engine version that the plugin support. For pre-built packages this is the Unreal Engine version that the plugin has been built against. For source releases the only difference between different Unreal Engine versions is the value for EngineVersion in AGXUnreal.uplugin. For example 4.26.

  • <AGX_VERSION> is the two-part AGX Dynamics version that is bundled with the plugin, for example 2.31.

  • <VARIANT> is the type of content that the package has and is either Source, Project, or a platform. Source is a source release of the plugin. It contains no precompiled binaries, not even any bundled AGX Dynamics. Project is the Unreal Engine project hosting the development of AGX Dynamics for Unreal. For prebuilt packages <VARIANT> is set to the platform for which the plugin has been built. This can be either Linux or Windows.

The plugin can be installed either to a particular Unreal Engine project or as an engine plugin. Installing the plugin directly to an Unreal Engine project means that it will be available for that project only and is automatically activated. This is supported only for C++ projects, not pure Blueprint projects. Installing the plugin as an engine plugin means that it can be activated for any Unreal Engine project, but must be explicitly activated for each project.

1.2.1. Installing a prebuilt plugin as an Engine Plugin

This section describe how to install a ready-to-use prebuilt plugin as an engine plugin, making it available for activation in all projects.

  • Download the plugin package for your platform.

  • Unpack the downloaded package to the Engine/Plugins/Marketplace directory in you Unreal Engine installation.

  • Use your license to enable AGX Dynamics for Unreal, see Licensing for details.

The plugin can now be activated for a particular Unreal Engine project by opening the project in Unreal Editor and selecting Top Menu Bar > Edit > Plugins > AGX Dynamics for Unreal and checking the Enabled checkbox. Restart Unreal Editor for the changes to take effect. The plugin is now ready to be used.

On Linux it may be necessary to configure the plugin for the current runtime environment. This is done by running the Unreal Build Tool for the project in which AGX Dynamics for Unreal has been activated. In the following, replace <PROJECT_ROOT> with the path to the project’s root directory and <PROJECT_NAME> with the name of the project.

<UE_ROOT>/Engine/Build/BatchFiles/Linux/Build.sh Linux Development -Project=<PROJECT_ROOT>/<PROJECT_NAME>.uproject -TargetType=Editor

1.2.2. Installing a prebuilt plugin to an existing project

This section describe how to install a ready-to-use prebuilt plugin to an existing Unreal Engine project. This installation method is only supported for C++ projects, not Blueprint-only projects.

  • Download the plugin package for your platform.

  • Create a directory named Plugins in your Unreal Engine project unless one already exists.

  • Unpack the package to the Plugins directory created in the previous step.

  • Use your license to enable AGX Dynamics for Unreal, see Licensing for details.

The next time the project is opened with Unreal Editor or from the Unreal Launcher a notification about the newly installed plugin will be shown and the plugin is ready to be used.

On Linux it may be necessary to configure the plugin for the current runtime environment. This is done by running the Unreal Build Tool for the project to which AGX Dynamics for Unreal has been installed. In the following, replace <PROJECT_ROOT> with the path to the project’s root directory and <PROJECT_NAME> with the name of the project.

<UE_ROOT>/Engine/Build/BatchFiles/Linux/Build.sh Linux Development -Project=<PROJECT_ROOT>/<PROJECT_NAME>.uproject -TargetType=Editor

1.2.3. Building and packaging from source

This section is for users who wish to use AGX Dynamics for Unreal with their local installation of AGX Dynamics, use the plugin on a platform for which prebuilt binaries aren’t available, or build the plugin against a custom Unreal Engine.

The Source package does not contain any prebuilt binaries for any platform, only the plugin source code and configuration files. It also does not contain AGX Dynamics, the physics engine that AGX Dynamics for Unreal integrate into Unreal Engine. AGX Dynamics must therefore be installed separately.

Creating a local version of AGX Dynamics for Unreal consists of three steps: building, packaging, and installation. These are described in the following subsections.

1.2.3.1. Requirements

  • Unreal Engine 4.26.

  • AGX Dynamics 2.32.1.0

  • Visual Studio 2019 or 2017 (Windows only).

  • .NET Framework SDK 4.6.0 or higher (Windows only).

1.2.3.2. Building

The source for the AGX Dynamics for Unreal plugin is distributed as part of an Unreal Engine project named AGXUnrealDev. When AGXUnrealDev is built the plugin source is also built along with it. The project AGXUnrealDev also contains a few example levels and assets that are good starting points for anyone wanting to learn how to use the plugin.

Download the Project package and unpack into your Unreal Engine projects directory.

In the following, <AGX> should be replaced with the installation directory of AGX Dynamics. <AGXUnrealDev> should be replaced with the directory unpacked from the AGX Dynamics for Unreal source project package. <UE_ROOT> should be replaced with the root directory of your Unreal Engine installation.

1.2.3.2.1. Linux
  • Select the AGX Dynamics installation to use:
<AGX>$ source setup_env.bash
  • Generate build project files from the Unreal Engine project file:
<UE_ROOT>$ ./GenerateProjectFiles.sh <AGXUnrealDev>/AGXUnrealDev.uproject -game
  • Build the project:
<AGXUnrealDev>$ make AGXUnrealDevEditor

If make completed successfully then the plugin has been built and is ready to be used within the AGXUnrealDev project. You can open the project and start experimenting with simulations, for example by testing one of the example levels, by opening the project as follows:

<UE_ROOT>/Engine/Binaries/Linux$ ./UE4Editor <AGXUnrealDev>/AGXUnrealDev.uproject

Remember that the plugin, when built this way, depends on the AGX Dynamics installation so Unreal Editor must always be opened from a terminal in which setup_env.bash has been sourced. If opened without setup_env you will get an error message saying

Plugin 'AGXUnreal' failed to load because module 'AGXUnrealBarrier' could not be loaded.

If you want to export the plugin for use in other Unreal Engine projects then continue under “Packaging” below.

1.2.3.2.2. Windows
  • Generate project files.

    Right-click the AGXUnrealDev.uproject file and select Generate Visual Studio Project Files.

  • Open a Command Prompt, cmd.exe from the directory containing the newly generated AGXUnrealDev.sln file.

  • Setup environment for AGX Dynamics.

<AGXUnrealDev> call "<AGX>\setup_env.bat"
  • From the same Command Prompt, open Visual Studio.

<AGXUnrealDev> devenv /UseEnv AGXUnrealDev.sln
  • From the Solution Explorer, right-click on the project AGXUnrealDev and select Build.

  • Launch the Unreal Editor by running the project from Visual Studio.

If you want to export the plugin for use in other Unreal Engine projects then continue under “Packaging” below.

1.2.3.3. Building against other Unreal Engine versions

To build the AGX Dynamics for Unreal plugin from source against an Unreal Engine version other than the current default version: 4.26, the EngineVersion in the file AGXUnreal/AGXUnreal.uplugin should be manually changed to the version used. Once complete, the instructions in Building and packaging from source can be followed.

1.2.3.4. Packaging

By packaging the AGX Dynamics for Unreal plugin we can use it in projects outside of the AGXUnrealDev project that was used to build it.

1.2.3.4.1. From the Unreal Editor

Once the plugin has been built and Unreal Editor is open, the plugin can be packaged by selecting Top Menu Bar > Edit > Plugins and then Package... under the entry for AGX Dynamics for Unreal located in the Project/Physics category. The rest of this text assumes that the plugin is packaged to PackagedPlugins/AGXUnreal, but any target directory will work.

1.2.3.4.2. From the command line

As an alternative to packaging from within Unreal Editor, it is also possible to use Unreal Automation Tool directly from the command line.

1.2.3.4.3. Linux
<AGXUnrealDev>$ <UE_ROOT>/Engine/Build/BatchFiles/RunUAT.sh BuildPlugin -Plugin=<AGXUnrealDev>/Plugins/AGXUnreal/AGXUnreal.uplugin -Package=<AGXUnrealDev>/PackagedPlugin/AGXUnreal -Rocket
1.2.3.4.4. Windows
<AGXUnrealDev> "<UE_ROOT>\Engine\Build\BatchFiles\RunUAT.bat" BuildPlugin -Plugin="<AGXUnrealDev>\Plugins\AGXUnreal\AGXUnreal.uplugin" -Package="<AGXUnrealDev>/PackagedPlugin/AGXUnreal" -TargetPlatforms=Win64 -Rocket

1.2.3.5. Installation

After building and packaging a package almost identical to the prebuilt packages has been produced and the instructions for any of the two Installing a prebuilt package subsections above can be used to install the plugin either to a project or as an engine plugin. The only difference is that the provided prebuilt packages have been compressed into a single Zip file while the package generated by Unreal Editor or Unreal Automation Tool are not, so the unpack step in the installation instructions should be skipped.

1.2.3.6. Extra runtime checks

AGX Dynamics for Unreal contains extra runtime checks that are disabled by default. To enable these checks either set the bEnableAGXCheck variable in AGXUnrealBarrier.Build.cs to true or set the AGXUNREAL_CHECK environment variable to true when generating project files and building the plugin.

1.3. AGX Dynamics

By default the plugin packaging process will produce a stand-alone plugin that does not depend on a system installation of AGX Dynamics; AGX Dynamics will be bundled in the plugin package. This means that it is only necessary to run AGX Dynamic’s setup_env when building the plugin the first time, not when using or rebuilding it.

However, by running setup_env and launching Unreal Editor from the same console/terminal it is possible to override the AGX Dynamics bundle inside the plugin and instead use an external one. This technique is also applicable for AGX Dynamics for Unreal plugins that has been packaged without a built-in AGX Dynamics bundle.

The built-in AGX Dynamics installation, if available, is split in two parts. Library binaries loaded by Unreal Engine are stored in AGXUnreal/Binaries/<platform> and resources used during building as well as AGX Dynamic’s internal operation during runtime are stored in AGXUnreal/Binaries/ThirdParty/agx.

1.4. Troubleshooting

1.4.1. The following modules are missing or built with a different engine version

This error may occur the first time the plugin is used on Linux. The full error message is

LogInit: Warning: Incompatible or missing module: AGXUnrealBarrier
LogInit: Warning: Incompatible or missing module: AGXUnreal
LogInit: Warning: Incompatible or missing module: AGXUnrealEditor
LogInit: Warning: Incompatible or missing module: AGXUnrealTests

The following modules are missing or built with a different engine version:
    AGXUnrealBarrier
    AGXUnreal
    AGXUnrealEditor
    AGXUnrealTests
Engine modules cannot be compiled at runtime. Please build through your IDE.

This problem is solved by building the plugin against the Unreal Engine installation on the local machine. If you are familiar with building Unreal Engine projects then build using that method. If not, then run the following in a terminal. Replace <PROJECT_ROOT> with the path to the project’s root directory and <PROJECT_NAME> with the name of the project.

<UE_ROOT>/Engine/Build/BatchFiles/Linux/Build.sh Linux Development -Project=<PROJECT_ROOT>/<PROJECT_NAME>.uproject -TargetType=Editor

where <UE_ROOT> is the root of your Unreal Engine installation, <PROJECT_ROOT> is the root directory of your Unreal Engine project and <PROJECT_NAME> is the name of you project.

1.4.2. libUE4Editor-AGXUnreal.so: cannot open shared object file: No such file or directory

This error may occur the first time the plugin is used in a C++ project on Linux. The full error message is

Warning: dlopen failed: libUE4Editor-AGXUnreal.so: cannot open shared object file: No such file or directory
Warning: ModuleManager: Unable to load module '<PROJECT>/Binaries/Linux/libUE4Editor-<PROJECT>.so' because the file couldn't be loaded by the OS.

Warning: dlopen failed: libagxPhysics.so.2.31.1.0: cannot open shared object file: No such file or directory
Warning: ModuleManager: Unable to load module '<PROJECT>/Binaries/Linux/libUE4Editor-AgxBarrier.so' because the file couldn't be loaded by the OS.


The game module <PROJECT> could not be loaded. There may be an operating system error or the module may not be properly set up.

This problem is solved by building the plugin against the Unreal Engine installation on the local machine. If you are familiar with building Unreal Engine projects then build using that method. If not, then run the following in a terminal. Replace <PROJECT_ROOT> with the path to the project’s root directory and <PROJECT_NAME> with the name of the project.

<UE_ROOT>/Engine/Build/BatchFiles/Linux/Build.sh Linux Development -Project=<PROJECT_ROOT>/<PROJECT_NAME>.uproject -TargetType=Editor

where <UE_ROOT> is the root of your Unreal Engine installation, <PROJECT_ROOT> is the root directory of your Unreal Engine project and <PROJECT_NAME> is the name of you project.

1.4.3. ERROR: Platform Linux is not a valid platform to build. Check that the SDK is installed properly

It has been noted that in some cases this error is given while packaging the plugin on Windows from the Unreal Editor even though only Win64 is checked in the Supported Platforms in the Project Settings. A workaround for this is to manually edit the file AGXUnreal.uplugin and move Linux from the WhitelistPlatforms to the BlacklistPlatforms for all modules listed.

1.4.4. Plugin ‘AGXUnreal’ failed to load because module ‘AGXUnrealBarrier’ could not be loaded

This error message is shown when AGX Dynamics for Unreal does not include a built-in AGX Dynamics bundle and setup_env hasn’t been run for any external AGX Dynamics installation.

It is also printed if the selected AGX Dynamics installation is binary-incompatible with the AGX Dynamics for Unreal plugin being loaded, for example because AGX Dynamics has been updated and AGX Dynamics for Unreal not yet rebuilt against the updated version.

1.4.5. Expecting to find a type to be declared in a module rules named ‘AGXUnrealBarrier’ in UE5Rules

This error message can show up when compiling C++ Unreal Engine projects that uses AGX Dynamics for Unreal. The cause is yet unknown, but a solution is to move the AGXUnreal directory with all its contents from Engine/Plugins/ to Engine/Plugins/Marketplace/. If the Marketplace directory does not exists, it can be created manually.

1.5. Where to go from here

For a quick-start guide in how to use AGX Dynamics for Unreal within Unreal Editor see Quick start guide.

1.6. Licensing

See Licensing for details about licensing.