Search Issue Tracker
Fixed in 2022.1.X
Fixed in 2020.3.X, 2021.2.X
Votes
0
Found in
Issue ID
1341031
Regression
No
Cannot rebind MultiPositionConstraint source objects when animator controller is changed at runtime
The user is trying to load an addressable prefab that references non-addressable animator controller. The controller reference will need to be replaced at at runtime.
If the controller is addressable (loaded from an asset bundle), it also needs to be rebound to the rig system.
This can be done by:
animator.enabled = false;
animator.runtimeAnimatorController = newController;
rigBuilder.Build();
animator.enabled = true;
However the prefab will not be animated as expected. The prefab's MultiPositionConstraint weight parameter is animated, but its source object weights remain unbound.
How to reproduce:
1. Download & open the project from the google drive link
2. Open the SampleScene Scene
3. Open the Addressables Groups window (Window -> Asset Management -> Addressables -> Groups)
4. Set the "Play Mode Script" to use "Use Existing Build..."
5. Delete the existing asset bundles (Addressables Groups window -> Build -> Clean Build -> All)
6. Build the asset bundles (Addressables Groups window -> Build -> New Build -> Default Build Script)
5. Enter the Play Mode and observe the Game view
6. See that the cube isn't being animated, but its MultiPositionConstraint (attached to this GameObject in the Hierarchy view: RootAddressable(Clone) -> Rig 1 -> Interpolate) is applying different weight values on its Source Objects.
Expected results: The cube is animated (moves left to right)
Actual results: The cube isn't moving.
Reproducible with: Animation Rigging 1.0.3, Addressables 1.17.17 (2021.1f1)
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Unused Particle System Renderer Mesh settings cause performance degradation when calling SetActive
- Project Browser shows the Asset folder empty when Select Dependencies is clicked without any asset selected
- Export as JSON and CSV options missing from the Quick Search save feature
- Crash on IMGUI::GUIWindow::OnGUI when rendering scene view window in play mode in a specific project
- "FileNotFoundException" & "IOException" thrown when adding "User" Index after deleting "Assets" Index in Search Index Manager window
Add comment