The official documentation does not mention this value, but there is a serialized field called “Allow Constant Clip Sampling Optimization” in the Debug mode Inspector of Animator.
What kind of behavior does this value control? The behavior of this boolean value has changed between versions prior to 2021 LTS and those after 2022. In 2022 LTS, values in AnimationClip keys that do not change are no longer being monitored.
Is this a specification change?
Additionally, will the current situation, where this property is set to internal
and cannot be modified from scripts, be changed in the future? While it is possible to modify it using the System.Reflection
namespace, we would prefer to avoid such workarounds whenever possible.
The devs made it internal for a reason, we should not worry what these values do or change them with reflection. They would have made it public and added documentation if they wanted us to change these values.
Our project’s motion uses extra bones in the model.
We have implemented custom correction system that allows for easy adjustment of these bones from the motion created in the DCC tool within the editor.
In this correction system, it is assumed that “the joints will stay fixed as long as a key is set, even if the value doesn’t change.” After updating the animation, the system allows for offsets to be applied to transforms.
That’s why this change has had the opposite effect.
However, we haven’t been able to find a solution to address this behavior other than switching this value.
If there are any side effects when switching, we would need to reconsider the implementation.
This change in behavior is likely aimed at optimizing performance by preventing updates when the keys have the same values.
I understand that there is a reason for it being hidden.