bevy/crates
andriyDev 2ea8f779c3
Prevent AnimationGraph from serializing AssetIds. (#19615)
# Objective

- A step towards #19024.
- `AnimationGraph` can serialize raw `AssetId`s. However for normal
handles, this is a runtime ID. This means it is unlikely that the
`AssetId` will correspond to the same asset after deserializing -
effectively breaking the graph.

## Solution

- Stop allowing `AssetId` to be serialized by `AnimationGraph`.
Serializing a handle with no path is now an error.
- Add `MigrationSerializedAnimationClip`. This is an untagged enum for
serde, meaning that it will take the first variant that deserializes. So
it will first try the "modern" version, then it will fallback to the
legacy version.
- Add some logging/error messages to explain what users should do.

Note: one limitation here is that this removes the ability to serialize
and deserialize UUIDs. In theory, someone could be using this to have a
"default" animation. If someone inserts an empty `AnimationClip` into
the `Handle::default()`, this **might** produce a T-pose. It might also
do nothing though. Unclear! I think this is worth the risk for
simplicity as it seems unlikely that people are sticking UUIDs in here
(or that you want a default animation in **any** AnimationGraph).

## Testing

- Ran `cargo r --example animation_graph -- --save` on main, then ran
`cargo r --example animation_graph` on this PR. The PR was able to load
the old data (after #19631).
2025-06-30 22:26:05 +00:00
..
bevy_a11y Bump Version after Release (#19774) 2025-06-22 23:06:43 +00:00
bevy_animation Prevent AnimationGraph from serializing AssetIds. (#19615) 2025-06-30 22:26:05 +00:00
bevy_anti_aliasing Add UVec to_extents helper method (#19807) 2025-06-26 20:53:49 +00:00
bevy_app Upgrade to Rust 1.88 (#19825) 2025-06-26 19:38:19 +00:00
bevy_asset bevy_asset: fix clippy in wasm (#19865) 2025-06-29 20:36:53 +00:00
bevy_audio Upgrade to Rust 1.88 (#19825) 2025-06-26 19:38:19 +00:00
bevy_color Ugrade to wgpu version 25.0 (#19563) 2025-06-26 19:41:47 +00:00
bevy_core_pipeline bevy_solari ReSTIR DI (#19790) 2025-06-29 19:01:32 +00:00
bevy_core_widgets Bevy Feathers: an opinionated widget toolkit for building Bevy tooling (#19730) 2025-06-28 19:52:13 +00:00
bevy_derive Bump Version after Release (#19774) 2025-06-22 23:06:43 +00:00
bevy_dev_tools Upgrade to Rust 1.88 (#19825) 2025-06-26 19:38:19 +00:00
bevy_diagnostic updating: very very minorly (#19827) 2025-06-26 21:48:20 +00:00
bevy_dylib Bump Version after Release (#19774) 2025-06-22 23:06:43 +00:00
bevy_ecs Spawn batch with relationship (#19519) 2025-06-30 22:13:38 +00:00
bevy_encase_derive Bump Version after Release (#19774) 2025-06-22 23:06:43 +00:00
bevy_feathers Bevy Feathers: an opinionated widget toolkit for building Bevy tooling (#19730) 2025-06-28 19:52:13 +00:00
bevy_gilrs Add newlines before impl blocks (#19746) 2025-06-22 23:07:02 +00:00
bevy_gizmos Type erased materials (#19667) 2025-06-27 22:57:24 +00:00
bevy_gltf Nudge users into migrating to new default glTF coordinate conversion (#19816) 2025-06-28 18:35:41 +00:00
bevy_image optimize ktx2 level data concatenation (#19845) 2025-06-29 21:59:56 +00:00
bevy_input bevy_input: build warnings without bevy_reflect (#19862) 2025-06-29 17:13:43 +00:00
bevy_input_focus Upgrade to Rust 1.88 (#19825) 2025-06-26 19:38:19 +00:00
bevy_internal Light Textures (#18031) 2025-06-30 21:56:17 +00:00
bevy_log Upgrade to Rust 1.88 (#19825) 2025-06-26 19:38:19 +00:00
bevy_macro_utils Bump Version after Release (#19774) 2025-06-22 23:06:43 +00:00
bevy_math Upgrade to Rust 1.88 (#19825) 2025-06-26 19:38:19 +00:00
bevy_mesh Ugrade to wgpu version 25.0 (#19563) 2025-06-26 19:41:47 +00:00
bevy_mikktspace Bump Version after Release (#19774) 2025-06-22 23:06:43 +00:00
bevy_pbr Light Textures (#18031) 2025-06-30 21:56:17 +00:00
bevy_picking Upstream raycasting UVs (#19791) 2025-06-24 18:10:59 +00:00
bevy_platform bevy_platform: clippy without default features (#19860) 2025-06-29 17:12:57 +00:00
bevy_ptr Add newlines before impl blocks (#19746) 2025-06-22 23:07:02 +00:00
bevy_reflect Update petgraph requirement from 0.7 to 0.8 (#19878) 2025-06-30 16:56:00 +00:00
bevy_remote Upgrade to Rust 1.88 (#19825) 2025-06-26 19:38:19 +00:00
bevy_render bevy_render: fix clippy on wasm (#19872) 2025-06-29 22:09:37 +00:00
bevy_scene Upgrade to Rust 1.88 (#19825) 2025-06-26 19:38:19 +00:00
bevy_solari bevy_solari ReSTIR DI (#19790) 2025-06-29 19:01:32 +00:00
bevy_sprite Type erased materials (#19667) 2025-06-27 22:57:24 +00:00
bevy_state Upgrade to Rust 1.88 (#19825) 2025-06-26 19:38:19 +00:00
bevy_tasks Update derive_more requirement from 1 to 2 (#19671) 2025-06-24 11:13:04 +00:00
bevy_text Bevy Feathers: an opinionated widget toolkit for building Bevy tooling (#19730) 2025-06-28 19:52:13 +00:00
bevy_time Bump Version after Release (#19774) 2025-06-22 23:06:43 +00:00
bevy_transform Update derive_more requirement from 1 to 2 (#19671) 2025-06-24 11:13:04 +00:00
bevy_ui Move TextShadow to text widget module (#19579) 2025-06-29 17:37:04 +00:00
bevy_utils bevy_utils: clippy without debug feature enabled (#19861) 2025-06-29 17:13:27 +00:00
bevy_window bevy_window: fix compilation without default features (#19870) 2025-06-30 20:51:52 +00:00
bevy_winit bevy_winit: fix compile and clippy on wasm (#19869) 2025-06-29 21:30:28 +00:00