Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
bevyengine
GitHub Repository: bevyengine/bevy
Path: blob/main/release-content/migration-guides/animation_graph_no_more_asset_ids.md
6592 views
---
title: "`AnimationGraph` no longer supports raw AssetIds" pull_requests: [19615]
---

In previous versions of Bevy, AnimationGraph would serialize Handle<AnimationClip> as an asset path, and if that wasn't available it would fallback to serializing AssetId<AnimationClip>. In practice, this was not very useful. AssetId is (usually) a runtime-generated ID. This means for an arbitrary Handle<AnimationClip>, it was incredibly unlikely that your handle before serialization would correspond to the same asset as after serialization.

This confusing behavior has been removed. As a side-effect, any AnimationGraphs you previously saved (via AnimationGraph::save) will need to be re-saved. These legacy AnimationGraphs can still be loaded until the next Bevy version. Loading and then saving the AnimationGraph again will automatically migrate the AnimationGraph.

If your AnimationGraph contained serialized AssetIds, you will need to manually load the bytes of the saved graph, deserialize it into SerializedAnimationGraph, and then manually decide how to migrate those AssetIds. Alternatively, you could simply rebuild the graph from scratch and save a new instance. We expect this to be a very rare situation.