Distributing projects and plugins
Important: make sure you have read the Key concepts page and familiarised yourself with all of the relevant background material prior to following the steps below.
You do not need to use precomputed dependency data in the following scenarios:
If everyone involved in the development of the Unreal Engine project or plugin is using conan-ue4cli. Using precomputed dependency data will simply result in extra work when changing or updating dependencies.
If you are only distributing packaged Unreal projects to your end users. The use of precomputed dependency data only matters at build time and has no effect on the resulting binaries when a project is packaged.
If you want to use conan-ue4cli as part of a Continuous Integration and Deployment (CI/CD) pipeline. You can use container images with conan-ue4cli included for performing builds, and speed up the build process by making use of Conan remotes to retrieve prebuilt binaries for your dependency packages. For more information about using Unreal Engine containers for CI/CD, see the Continuous Integration and Deployment (CI/CD) page of the Unreal Containers community hub documentation.
You do need to use precomputed dependency data in the following scenarios:
If one or more people involved in the development of the Unreal Engine project or plugin are not using conan-ue4cli. This might be due to an inability or unwillingness to adopt additional infrastructure requirements across all developer machines, or because the project or plugin is open source and the maintainers wish to minimise the barriers to entry for new contributors. Using precomputed dependency data is the only way to enable developers to work on the project or plugin without having conan-ue4cli installed and configured on their machines.
If you are distributing packaged Unreal plugins to developers via the Unreal Engine Marketplace. Marketplace plugins must include source code for compilation by developers who download them even if they include precompiled binaries for all supported target platforms, and are also subject to automated verification testing upon submission. As a result, these plugins must compile correctly without requiring additional environment configuration and therefore must use precomputed dependency data.
Generating precomputed dependency data
By default, boilerplate modules retrieve information about their dependencies from Conan when they are built, which means that Conan, the relevant UE4 Conan profiles generated by conan-ue4cli and their corresponding wrapper packages must all be present in order to build any Unreal project or plugin that includes a boilerplate module. To facilitate sharing Unreal projects and plugins with developers who do not have conan-ue4cli installed on their machines, conan-ue4cli can generate Precomputed dependency data for a boilerplate module, storing the data retrieved from Conan in a filesystem subdirectory and removing the requirement to invoke Conan when the module is built.
The ue4 conan precompute command generates precomputed dependency data for a boilerplate module. The ue4 conan bake command is also provided as a shorter alias for the precompute command, in reference to the common terminology of “baking” precomputed data into a format suitable for subsequent use without the need to repeat the original computation that created it. The examples below all use the precompute command for the sake of consistency, but the two commands are interchangeable.
To generate precomputed dependency data for a boilerplate module, run the ue4 conan precompute command from the directory containing the module’s rules file and
conanfile.py, specifying the name of the UE4 Conan profile for which dependency data should be precomputed. For example, you would use the following command to precompute dependency data for a non-debug 64-bit Windows target under Unreal Engine 4.24.3:
If you want to generate precomputed dependency data using the default profile for the host platform and the Unreal Engine version reported by ue4cli then you can use the special
Once the precomputed dependency data has been generated successfully then it will be stored in a filesystem subdirectory inside the boilerplate module’s directory and the logic in the module’s rules file will use the precomputed data when building for that configuration instead of invoking Conan to retrieve the required information.
Managing precomputed dependency data for multiple configurations
It is important to note that the logic inside a boilerplate module’s rules file will only use precomputed dependency data if it is available for the current build configuration, and will automatically fallback to invoking Conan to retrieve data in the event that no precomputed data is available. As a result, it is necessary to generate precomputed dependency data for each target platform and Unreal Engine version with which a project or plugin supports being built without conan-ue4cli being installed. To make managing this data as transparent as possible for developers, conan-ue4cli stores precomputed dependency data in a well-defined and easily understood directory structure. The example below shows what the filesystem layout might look for a boilerplate module with precomputed data for multiple configurations:
The separate subdirectories used to store precomputed dependency data for different versions of the Unreal Engine and different target platforms make it easy for developers to inspect the module’s filesystem tree and determine which configurations currently have precomputed data and which configurations do not. Multiple invocations of the ue4 conan precompute command with different UE4 Conan profile names specified will result in different subdirectories being populated. As result, multiple invocations against a single boilerplate module’s source tree will produce cumulative results, and invocations across different machines or build environments can be aggregated by simply copying the resulting subdirectories into a single central location.