How can i blend two(or more) animations like a blend tree, but only with scripts?

Hello,im currently creating my character controler and looking into playing animations through scripting i was curious if i could play a blend between two or more animations, i know i can achieve this with a blend tree, but i want to know if there’s a way to do it purely on scripts. I also now Animator.CrossFade will transition between them, but how can i keep it in the middle ground?
Is more to sate my curiosity as of now, but i’d apreciateif someone could answer me this.
thanks in advance.

Everything you need is in here

You can even script for Blendtree setup.