Dynamically generates humanoid UnityEngine.Avatar
from skeleton bones at runtime.
Add following dependencies to your /Packages/manifest.json
.
{
"dependencies": {
"com.mochineko.dynamic-unity-avatar-generator": "https://github.com/mochi-neko/dynamic-unity-avatar-generator.git?path=/Assets/Mochineko/DynamicUnityAvatarGenerator#0.2.1",
"com.mochineko.relent": "https://github.com/mochi-neko/Relent.git?path=/Assets/Mochineko/Relent#0.2.0",
"com.cysharp.unitask": "https://github.com/Cysharp/UniTask.git?path=src/UniTask/Assets/Plugins/UniTask",
...
}
}
Generates UnityEngine.Avatar
from humanoid 3D model hierarchy at runtime
with specifying skeleton root bone retrieval logic (IRootBoneRetriever
),
human bone retrieval logic (IHumanBoneRetriever
)
and other parameters of HumanDescription
(HumanDescriptionParameters
).
- Humanoid
UnityEngine.Avatar
generator - Root bone retriever (
IRootBoneRetriever
)- Regular expression matching
- String comparison rule
- Specifying root bone instance
- Has most children bones
- Human bone retriever (
IHumanBoneRetriever
)- Regular expression matching
- String comparison rule
- Human bone transform map
IReadOnlyDictionary<HumanBodyBones, Transform>
creator fromUnityEngine.Avatar
.
See AvatarGeneratorTest.
Regular expression pattern samples are in RegularExpressionHumanBoneRetrieverTest.
Provides some presets of IRootBoneRetriever
, IHumanBoneRetriever
and HumanDescriptionParameters
.
- Root bone retriever (
IRootBoneRetriever
)- Mixamo and Biped preset
- Human bone retriever (
IHumanBoneRetriever
)- Mixamo and Biped preset
- Human description parameters (
HumanDescriptionParameters
)- Sample preset
See presets.
See CHANGELOG.
See NOTICE.
Licensed under the MIT license.