3D Skeleton with predefined (inspector) GameObjects per Joint

I want to define (with the inspector) seperate GameObjects per Joint. At the moment I am using the SimpleSkeletonAvatar3d and NativeAvatar scripts. But within both scripts the GameObject get created serialized in the update and cannot be defined previously in the inspector. Can anyone help how to adress the joints? Thanks in advance

Hi Jens,

For example, you can replace the Prefab Joint with an array of GameObjects in NativeAvatar. If you use 16 joints, the size of the array of GameObjects should be 16. In Instantiate, loop over the array of GameObjects.

So you have to change only 2 lines:

instead of

public GameObject PrefabJoint;
CreatedJoint[q] = Instantiate(PrefabJoint);


public GameObject[] PrefabJoints;
CreatedJoint[q] = Instantiate(PrefabJoints[q]);

And set the required GameObjects in the array in the Unity Editor.

1 Like