How to reset pose of avatar in script?

I know I can reset it by clicking the Pose/Reset button in Avatar configure window, but how can I do it in script? Didn’t find any useful API in Unity documents.

Curious.

If scripts don’t work you could simply create a short animation clip in Blender or similar with just the T Pose. I think you can somehow record the pose as an animation in Unity. Then you could play that clip without any blending and the character would be in T Pose.

The closest I could find is this one but I don’t know how to use it: Unity - Scripting API: Animations.AnimationHumanStream.ResetToStancePose

There’s also a HumanPoseHandler. It doesn’t show a specific TPose method but perhaps this is wha the “GetInternal” methods return.

But more likely HumanDescription’s skeleton property. This provides you with a list of bones, if I understand correctly it’s a mapping to the imported TPose. I suppose you could manually iterate over them and apply the position/rotation to every bone in your in-scene model hierarchy.

Or maybe it’s as simple as instantiating a mesh but without and Animator. This should default the mesh to the same pose you see in the importer. You can either use that as a reference and apply the bone transforms to your instance, or perhaps it’s as simple as resetting the Animator and/or disabling it.

Let me know which one works cause I may need that myself at some point.

I mean in Editor actually, I need the exact funtion as the image above, but with Unity script, so I can make a automatic model import pipline.