IN THIS ARTICLE
Using the Asset Validation Gem to Verify Seeds
After you’ve built a seed list but before you bundle, you can use the Asset Validation gem to verify that asset loads map back to seeds. The Asset Validation gem adds a set of seed-related commands to the O3DE console command window. You can use these commands to ensure that you have seeds for all assets that you want to bundle.
One of these commands, seedmode, makes a seed mode active. When seed mode is active and an asset file loads, O3DE traverses the dependency graph from the newly loaded asset until it finds a seed for the asset. If it doesn’t find a seed for the asset, an error message displays. It warns you that the loaded file won’t be bundled if you try to bundle using the seeds that you provided for the current validation session.
During development, use seed mode to ensure that as assets get added they’re properly bundled and included in the shipping version of the game.
Note:If you already have bundles to test, you can use bundle mode instead of seed mode. For more information, see Using Bundle Mode to Test Bundles.
Enable the Asset Validation Gem in your game project using Project Manager.
When you use O3DE Editor or the launcher to run your game, the following console commands are available:
seedmode - Enables or disables the reporting system.
- Adds the specified asset and all of its dependencies as a seed to your dependency graph, so they no longer are reported as missing. The
addseedpathcommand lets you test which assets should be added to your seed list for packaging.
- Removes an asset from the dependency graph.
listknownassets - Lists all the assets in your current dependency graph.
- Adds all the seeds found in the specified seed list to your known dependency graph. Because the path is a source path, it is relative to your project directory.
- Removes all the assets in a seed list from your graph.
printblacklisted - Enables or disables the display of approved assets in the system. Some assets, like shaders, are loaded at runtime and do not appear in your dependency graph. By design, shaders are packaged in their own
.pakfile, are not found in the dependency graph, and do not need to be reported by the system. However, you can use the
printblacklistedcommand to force shaders or other approved asset types to be included in the dependency graph.
The following procedure shows how to use seed mode to troubleshoot a level that has missing assets.
To test seed mode
In the O3DE console, enter the command
seedmode. Asset validation begins.
seedmode [CONSOLE] Executing console command 'seedmode' (AssetValidation) - Asset Validation is now on
Enter game mode. In the console, seed mode reports multiple Asset not found in seed graph errors.
Exit game mode.
addseedpathcommand to add the missing asset file. This example uses the command
Enter game mode. The Asset not found errors no longer appear.
If seed mode reports that an asset is missing, the asset might be one of the following:
- Part of a list that you haven’t added to the graph yet.
- An asset that must be added as a dependency of another asset already found in the level.
- An asset that must be a seed itself.