wait_for_asset
Polls O3DE asset build status until the asset compiles, then returns ready status or explains build failures with logs and jobs.
Instructions
Wait until one asset is built, or report why it failed.
Polls get_asset_status. compiled returns {"path", "status": "compiled", "ready": true, "elapsed"}. A failed build returns the error
asset_build_failed with the failed jobs and their logs. A source whose
build failed answers missing, just like one the Asset Processor has
not seen yet, so after a short grace period a missing status is
checked against get_asset_jobs. When timeout runs out the result
is {"ready": false, "status": <last status>}, not an error. Needs the
AiCompanion gem 0.6.0+.
Args:
path: The asset to wait for: its source path (best, since the job
check needs the source) or a product path.
timeout: Seconds to wait (default 120, max 3600).
just_written: True right after writing the file, so the first query
flushes the file monitor.
source_path: The source file to check for failed jobs, when path
is a product path.
poll_interval: Seconds between polls (0.1 to 10, default 1).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| timeout | No | ||
| source_path | No | ||
| just_written | No | ||
| poll_interval | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |