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
- Asset creation in the Project Browser is not always undone/inconsistent when the undo shortcut is pressed right after creating an asset
- JobTempAlloc memory leak warning is thrown when the Player is shut down
- Graphics State Collection warm-up does not work when using with Addressables Shaders
- "Baked Shadow Radius" field is visible but inactive when when the Shadow Type is set to "Hard Shadows" under the Light Component
- Crash on OnDemandScheduler::HandleImportWorkerLogs when performing various Unity operations
Add comment