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
- Active quality level set on a new Universal 2D project is not the default quality level when creating a new project
- Inspector Open button does nothing when navigating to a different folder with a locked asset
- Pre-generated XML serializers fail to deserialize types that use polymorphism when the Player is built with the IL2CPP scripting backend
- Editor crashes with error "Failed to present D3D11 swapchain due to device reset/removed" and Player freezes when rendering a particle system while using modified URP package on DX11
- Crash on Scripting::LogException when async HTTP callback executes after scripting domain teardown
Add comment