ArticyXImporter
ArticyXImporter for Unreal Engine
Loading...
Searching...
No Matches
Build Server Integration

Integrating articy:draft into your build server workflows is crucial for automating the import process of narrative content into your Unreal Engine projects. This section outlines how to use ArticyImport commandlets for automation, the available options, and how to integrate them into your CI/CD pipelines.

Source Control

The folder ArticyContent/Generated contains files that are automatically regenerated by the plugin during the import process. These files generally do not need to be version-controlled, as they can be recreated during the build process. Ensure that the necessary Articy project files are committed to version control, while generated content can remain excluded.


Automating the Import Process

The ArticyImport commandlet can be used to automate the import of articy:draft data into Unreal Engine. This is particularly useful for build servers or continuous integration pipelines, enabling automated content updates.

Commandlet Integration

To integrate ArticyImport into your build server or automation pipeline, use the -run switch with the UnrealEditor-Cmd.exe executable. This allows you to execute the ArticyImport commandlet with optional flags to control the import behavior.

Example Command:

UnrealEditor-Cmd.exe <PathToGame.uproject> -run=ArticyImport -ArticyReimport

Where:

  • <PathToGame.uproject> should be replaced with the path to your Unreal Engine .uproject file.
  • -ArticyReimport: Forces a complete reimport of all Articy data, including asset regeneration.

Commandlet Options

Here are the main options available for the ArticyImport commandlet:

  • ArticyReimport: Forces a complete reimport of Articy data, refreshing all imported content and regenerating assets. This is used when you want to ensure that all narrative and asset data is fully synchronized with the latest changes from articy:draft.
  • ArticyRegenerate: Only regenerates assets based on existing data. Use this if no data needs to be reimported but assets need to be refreshed (e.g., after making changes to asset templates or structures).
Note
ArticyReimport and ArticyRegenerate are mutually exclusive flags. When using ArticyReimport, there is no need to specify ArticyRegenerate because a full reimport will already handle asset regeneration.

Example Command Breakdown:

UE4Editor-Cmd.exe <PathToGame.uproject> -run=ArticyImport -ArticyReimport
  • -ArticyReimport: This flag ensures that all data from articy:draft is fully reimported into Unreal Engine. This is useful when you want to guarantee that the content and assets are fully synchronized.

If you don't need to reimport data but only want to refresh generated assets, use:

UE4Editor-Cmd.exe <PathToGame.uproject> -run=ArticyImport -ArticyRegenerate
  • -ArticyRegenerate: This flag regenerates the assets based on existing articy:draft data. It's useful when asset definitions or templates have changed but no new narrative content needs to be reimported.

Build Server Automation Example

Here is an example of how to incorporate the ArticyImport commandlet into a build server script:

# Start Unreal Editor in command-line mode and run the ArticyImport commandlet
UE4Editor-Cmd.exe C:/Project/MyGame.uproject -run=ArticyImport -ArticyReimport
# Optional: Add further commands, like building the game package or running unit tests.
UE4Editor-Cmd.exe C:/Project/MyGame.uproject -run=AutomationTest -TestName=SampleTest

This script forces a full reimport of Articy data using the -ArticyReimport flag. After the reimport, it optionally runs automation tests.


Handling Build Process Success and Failure

When using ArticyImport in automation scripts, handle the success or failure of the import process by checking the exit codes from UE4Editor-Cmd.exe.

  • Exit Code 0: Indicates a successful import.
  • Exit Code 1: Indicates an error during import or reimport.

Make sure to capture these exit codes to manage build process notifications and error handling in your CI/CD pipeline.


Example Build Server Workflow

Here’s how you can incorporate the ArticyImport commandlet into a build server workflow with conditional actions based on the success of the import process:

# Run ArticyImport with Reimport option
UE4Editor-Cmd.exe C:/Project/MyGame.uproject -run=ArticyImport -ArticyReimport
# Capture exit code
EXIT_CODE=$?
# Check if the import was successful
if [ $EXIT_CODE -eq 0 ]; then
echo "Articy data imported successfully!"
# Proceed to build the game package
UE4Editor-Cmd.exe C:/Project/MyGame.uproject -run=BuildCookRun
else
echo "Articy import failed with exit code $EXIT_CODE."
# Handle failure case, such as sending a notification or logging
exit 1
fi

This script runs the ArticyImport commandlet with the -ArticyReimport flag, captures the exit code, and proceeds with game packaging if the import is successful. If the import fails, it logs an error and exits the script.


Integrating articy:draft imports into Unreal Engine’s build server automation helps keep your narrative content synchronized with your game. Use the ArticyImport commandlet with the appropriate flags (-ArticyReimport for a full reimport or -ArticyRegenerate for asset regeneration) to control how articy:draft data is processed. By leveraging these tools, you can automate narrative content updates as part of your continuous integration workflows, ensuring that your game’s content is always up to date with minimal manual intervention.