Setup Local Asset Validation
Last updated
Last updated
The setup is recommended to be done by one person in your team and version controlled to avoid unnecessary duplication of work.
Enable the “Linter” plugin by adding the following to your .uproject
file.
{
"Name": "Linter",
"Enabled": true,
}
Version control this so all devs can use it without doing this step
Run a first-pass validation
Right-click your plugin folder and select “Scan with Linter”
Select the WorldBuilder Preflight RuleSet and click “Next”
Once you have your first validation result and opened, there will likely be many errors under “2.11 Asset references across plugins“. To fix this, in your World Builder .uplugin
that stores your content and that you’ll upload, you need to add the content dependencies that you use.
Using your validation result, collate a list of plugins you need to add dependencies for. In the below example, I’ll add M2Core, M2Content, JunoSkypark
(e.g. if the error says “This asset references "/M2Core/…”` then you need the M2Core
dependency)
Navigate to the .uplugin
file, open it in your favourite text editor which should look like this
Add the following section, and add each plugin dependency you need.
The .uplugin
file should now look like this. Make sure to also version control this modified file.
Re-run the linter, which should now be free of those errors and will be left with relevant validation issues.
(optional) Copy the M2upPreflightRuleSet
you just used and make a local version so you can control your own validation settings. To use this asset, set it as the Default Lint Rule Set
in the Project Settings, and ensure you check in /Config/DefaultLinter.ini
where this is saved.
You can run a normal World Builder package to test your content cooks correctly, while also avoiding uploading the content which can take a long time and is unnecessary for pure validation.
Navigate to your World Builder settings and enable “Show Package Only Command”
You can version control this change by using “Set as Default” in the top-right of the Editor Preferences, which will update DefaultPerProjectUserSettings.ini
in your project config folder.