Search Unity

Question call Two Bone IK contstrain's auto setup by script

Discussion in 'Animation Rigging' started by calpolican, Jul 15, 2021.

  1. calpolican

    calpolican

    Joined:
    Feb 2, 2015
    Posts:
    425
    I'm trying to write an auto rig feature, and I wanted to create the IK handles automatically, but I haven't been able to find where the "Auto Setup From Tip Transform" method is.
    I'm refering to the mothod of that name that appears in the drop down menu when you right click the Two Bones Constrain component. I check the class and the data class but it's in none.
    Can anyone point me to it. Also, are there no docs on the scripting api of this package?
     
    Last edited: Jul 16, 2021
  2. simonbz

    simonbz

    Unity Technologies

    Joined:
    Sep 28, 2015
    Posts:
    295
    Hi, the method for TwoBoneIK auto-setup is not visible in the public API, but you can find it nonetheless if you browse the sources of Animation Rigging.

    The implementation is in `TwoBoneIKConstraintEditor.TwoBoneIKAutoSetup`.

    As for the scripting API, it's right alongside the package documentation. You can get it here:
    https://docs.unity3d.com/Packages/com.unity.animation.rigging@1.1/api/index.html
     
    calpolican likes this.