Animation Rigging - Outside of Playmode

Hello

I’ve set up a character to use some basic FK controls and IK constraints. I want to use these controls to pose our characters. I need to use these controllers outside of play mode.

I’ve searched the forum and found this recent thread

It was mentioned that having the animation or timeline window open and in preview / record mode will then allow the controllers to work in edit mode but this isn’t very reliable.

Any suggestions would be very welcome

Thanks

I had a brief look into this, and seems just calling RigBuilder.Build() while in edit mode apparently works:

    [ExecuteAlways]
    public class AnimationRigRunner : MonoBehaviour
    {
        public bool shouldBuildRig;

        private void Update()
        {
            if (shouldBuildRig)
            {
                GetComponent<RigBuilder>().Build();

                shouldBuildRig = false;
            }
        }
    }

Be warned that the only thing I tested was sucessfully using an IK target to move a foot around while in edit mode. I don’t know how this interacts with prefabs, baked animations, timelines, or anything else. So I don’t know how usable this is in practice.

1 Like