Updating Consequence on a Build Machine

While the manual update approach (see Workflow) is great for quickly grabbing latest data from Consequence and testing and submitting, many times you will want to build data in the background automatically whenever you submit from Consequence.

For this reason, Consequence's update process can also be triggered as an Unreal Engine commandlet.

Prerequisites

To set this up on a build machine, ensure that you have the following prerequisites:

  • An always-on build machine with your Unreal Engine project installed
  • A Perforce user for your build machine with appropriate permissions to submit to your project
  • Ideally, with the editor having been run once, and Source Control set up from within the editor

Perforce Hook

We recommend setting a Perforce hook to trigger your build command let whenever any of the following directories are submitted.

All of these directory settings are defined in Consequence Editor Settings in the plugin's Engine Settings:

  • Essential: The ConsequenceExport.json file in your Consequence Export JSON Directory.
    • NOTE: do not set a trigger for this whole directory – if you do, you will recursively trigger your build process whenever the build process submits the ConsequenceStringsExchange.json file.
  • Strongly Recommended: Any Uasset files in your Consequence String Tables Directory (it is best to only keep String Table assets in this directory for that reason).
    • Enables syncing strings into Consequence more frequently after engine-side strings updates.
  • Optional: Any Uasset files in your Consequence Ak Event Parent Directory.
    • Enables associating audio event assets with Consequence lines as soon as the audio is submitted.
  • Optional: Any Uasset files in your Consequence Facial Animation Parent Directory.
    • Enables associating facial animation assets with Consequence lines as soon as the anims are submitted.

Commandlet to Run

The Unreal commandlet should be triggered with this syntax, making sure to fill in the correct:

  • Path to UnrealEditor-Cmd.exe – this should be inside Engine\Binaries\Win64\ inside your base Unreal directory (the parent directory of the one named after your project).
  • .uproject file path – one level below your Unreal directory, inside the directory name after your project
  • Perforce server:port combination (P4Port)
  • Perforce username (P4User)
  • Perforce Workspace name (P4Client).
"C:\[path to Unreal]\Engine\Binaries\Win64\UnrealEditor-Cmd.exe" "C:\[path to Unreal]\[your project name]\[your project name].uproject" -run=ConsequenceImportCommandlet -SCCProvider=Perforce -P4Port=[server:port] -P4User=[username] -P4Client=[workspace name]

For example:

"C:\consequence-demo-workspace\Engine\Binaries\Win64\UnrealEditor-Cmd.exe" "C:\consequence-demo-workspace\KillerDemo\KillerDemo.uproject" -run=ConsequenceImportCommandlet -SCCProvider=Perforce -P4Port=localhost:1666 -P4User=KillerDemoBld -P4Client=consequence-demo-workspace