Enabling "Normalized Blend Values" via Script.

I tried to create blend tree automatically with animation clips.
everything was fine until i met the boolean called “Normalized Blend Values”.

6436043--720101--capture1.PNG

I couldn’t find any similar parameter from Blend Tree document but I found it from Unity CS Reference.
I was able to access to Blend Tree and modify child motion and parameters but only that boolean option is holding my process.
I need to make it as enabled via script. Is there any way to access and change it?
Thank you.

I’d hazard guess it corresponds to the “Automate Thresholds” value and has been renamed only recently.

Thank you for the reply.
I’ve tried useAutomaticThresholds on Direct mode but no luck…
to make sure, I tried to set it on 1D then switch to Direct, same. it was disabled.
Guess something is cannot be automated…

See if it is possible to enable debug view in inspector for blend tree nodes, and if debug view reveals additional information.

Oh yeah. I can see that it was enabled on debug mode. But “Use Automatic Thresholds” only. It was separated from Normalized Blend Value.

Okay. I asked to Unity dev team and this is what I got as the answer.

using (var so = new SerializedObject(blendTreeAsset))
{
  so.FindProperty("m_NormalizedBlendValues").boolValue = true;
  so.ApplyModifiedProperties();
}

(replace “blendTreeAsset” to your blend tree name)
You do not need anything but adding that code where you need and done.

You can track (almost) every properties on Inspector by hold shift and right click the property.
then its true name will be shown on console.

1 Like