using System.Collections; using System.Collections.Generic; using UnityEngine; using RootMotion; // Need to include the RootMotion namespace as well because of the BipedReferences public class FinalIKIntegration : MonoBehaviour { // Start is called before the first frame update void Start() { } // Update is called once per frame void Update() { } public void Integrate(UMA.UMAData umaData) { //this adds the FBBIK component to your character RootMotion.FinalIK.FullBodyBipedIK fbbik = gameObject.AddComponent(); //this will set the references for your character BipedReferences references = null; BipedReferences.AutoDetectReferences(ref references, fbbik.transform, BipedReferences.AutoDetectParams.Default); fbbik.SetReferences(references, null); //this will set the orientation of your character's limbs fbbik.solver.SetLimbOrientations(BipedLimbOrientations.UMA); } }