Is there a way to find the rest positions/orientations of bone transforms of an imported object?

I have a some character models with bones/joints that I import into Unity (so inside the imported GameObject I have some geometry and then I have a hierarchy of whatever, loSpine, upSpine, lShoulder, lArm, lElbow, etc., etc…)

I have some scripts driving the animation of the individual bones, and in the Awake function of those scripts, it walks through the bone hierarchy and looks at how the bones are oriented, what the distances between them are, etc., in order to set some internal fields (e.g. what the elbow’s X axis is, the length of the upper and lower arms to do IK calculations). That way if I change my model in my external application and reimport them, all my various functions still work correctly.

My question is: if I pose the character model out of its rest pose in my scene in the editor (standing in idle position as opposed to arms outstretched jesus pose or sitting down), my Awake function finds all the posed positions instead of the positions they were originally imported, so I don’t really know what the model was “supposed” to look like. Is the original imported rest state of the model available anywhere for me to get at?

A simple solution would be to make a prefab of your model at its starting position and read what ever you want to read for the prefab rather than you gameobject in your scene.

You can have a public variable and drag you prefab in the inspector or make your prefab a resource. If you don’t know how to use resources go this documentation.