How to create Rig Effectors from a script and add to rigging constraints

I have a series of characters with identical bone structures (coming from VRoid Studio). I am writing a script to add Bone Renderer, Rig/RigBuilder/TwoBoneIKConstraints etc for arms and legs. That is all working.

But I am stuck trying to script the adding of red balls (BallEffector) to the “Left Hand IK_target” constraints etc, like in the Unity demo video (done manually).

I found the RigEffectorData etc classes (e.g. struct RigEffectorData.Style) and created an instance of them (without compile errors at least!). But I could not find an example of how to associate a RigEffectorData instance to the LeftHandIK_target node in the scene.

Ah, worked it out. Finally noticed Rig and RigBuilder have the AddEffector() method. The online docs left out the relevant interface function they both inherit from. Got it all working!