Switching SDK configurations

By default Gameface SDK is using Release configuration, but Development configuration is also distributed. Switching to Development configuration can help with narrowing down performance and other hard to find issues, which would be even harder still, using the fully optimized Release configuration. Using Gameface in Development configuration will also let you see lower logging levels.

Switching between configurations is easy, but requires some initial setup. There are two ways to do it:

Controlling Gameface 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.

Controlling Gameface 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>