SDK configurations
Overview
The Cohtml library, which lies at the core of Prysm and does most of the hard lifting related to UI comes in two configurations.
- The Development configuration contains all features that are useful during UI development, primarily those relating to debugging or profiling.
- The Release configuration does not contain those features, resulting in a reduced memory footprint and improved performance.
How to use
Ideally, you should use Development libraries for all development phases of your workflow - in the Editor, or when running packaged games for profiling/debugging reasons. On the contrary, Release libraries should be used in shipping builds or when trying to estimate the final performance/memory footprint of your game. By default, Prysm uses Release
configuration when building Unreal Engine games in Shipping
, and Development
configuration for all other cases. For more information on how to manually switch between the two, check out the Switching between configurations section of this page.
Details
Overriding the SDK configuration
Please note that the Release
configuration has some features disabled, which should be used only as part of the development process.
However, it’s possible to override the Prysm configuration using an environment variable or an XML setting:
Overriding the SDK configurations via environment variable
This method requires little setup, all you have to do to change from Release
to Development
, is to make a new environment variable named CoherentLibsConfig and set its value to either Release or Development.
Overriding the SDK configurations via XML settings
This method requires a minor engine modification, but is better integrated with the typical Unreal Engine environment, and once set up, switching SDK configurations will be easier.
In order to set it up, you should add the CoherentConfiguration
class inside the UnrealBuildTool
namespace in Engine\Source\Programs\UnrealBuildTool\Configuration\BuildConfiguration.cs
:
// COHERENT: Begin
/// <summary>
/// Global settings for Coherent Cohtml and Renoir Plugins.
/// </summary>
public class CoherentConfiguration
{
/// <summary>
/// Coherent SDK Libraries Configuration Type
/// </summary>
public enum ConfigType
{
/// <summary>
/// Libraries in Development
/// </summary>
Development,
/// <summary>
/// Libraries in Release
/// </summary>
Release,
}
/// <summary>
/// This setting is controlling the configuration of the Coherent SDK Libraries,
/// used when building, linking and packaging the Cohtml and Coherent Rendeing Plugins.
/// </summary>
[XmlConfigFile]
public static ConfigType CoherentLibsConfig = ConfigType.Release;
}
// COHERENT: End
You will now be able to add an override inside the XML configuration files used by Unreal. For example, the global location for such XML file is %APPDATA%\Unreal Engine\UnrealBuildTool\BuildConfiguration.xml"
. There you can add the following override:
<?xml version="1.0" encoding="utf-8" ?>
<Configuration xmlns="https://www.unrealengine.com/BuildConfiguration">
<CoherentConfiguration>
<CoherentLibsConfig>Development</CoherentLibsConfig>
</CoherentConfiguration>
</Configuration>