Register AssetPath as type for reflection (#11483)

# Objective

- `AssetPath` implements reflection, but is not registered as a type in
the plugin.
- Fixes #11481.

## Solution

- Register the `AssetPath` type when `AssetPlugin::build` is called.

---

## Changelog

- Registered `AssetPath` type for use in reflection.
This commit is contained in:
BD103 2024-01-22 23:30:44 -05:00 committed by GitHub
parent 593d41ce58
commit 3cfcebcf74
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -218,7 +218,8 @@ impl Plugin for AssetPlugin {
UpdateAssets,
TrackAssets.after(handle_internal_asset_events),
)
.add_systems(UpdateAssets, handle_internal_asset_events);
.add_systems(UpdateAssets, handle_internal_asset_events)
.register_type::<AssetPath>();
let mut order = app.world.resource_mut::<MainScheduleOrder>();
order.insert_after(First, UpdateAssets);