I’m working on an animation that can use the normal animator and use the rig functionality from the Unity Animation Rigging package. I’m trying to edit the weight slider from a script so I can blend between normal animation and rigged animation.
I can drag the weight slider in the Inspector but haven’t been able to edit the slider in a C# script.
My question is: How can I edit the weight slider with a C# script.
To make everything a bit more clear: Brackeys talks about the weight slider in this video:
(@ 8:04)
Help is much appreciated!
=========
Fixed it, so if somebody crosses this on google this is the solution:
Add
using UnityEngine.Animations.Rigging;
To the top, afterwards you can reference the rig with public Rig!
But how can you change it smoothly?
I have done this but even if I change from 1 to 0 inside a Coroutine decreasing the value every 0.1 seconds, its noticeable and not smoothly.
If you’re using an Assembly Definition, make sure to add UnityEngine.Animation.Rigging to the list of references:
That’s what my problem was.
Note: It shows up as “Unity.Animation.Rigging” without the “s” after “Animation”, but the using statement is still “using UnityEngine.Animations.Rigging;” with the “s”.
I’m on Unity 2020.3.30f1 with “com.unity.animation.rigging”: “1.0.3”