Skip to content

Dynamically generates humanoid `UnityEngine.Avatar` from skeleton bones at runtime.

License

Notifications You must be signed in to change notification settings

mochi-neko/dynamic-unity-avatar-generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dynamic-unity-avatar-generator

Dynamically generates humanoid UnityEngine.Avatar from skeleton bones at runtime.

How to import by Unity Package Manager

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",
        ...
    }
}

Features

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 from UnityEngine.Avatar.

How to use

See AvatarGeneratorTest.

Regular expression pattern samples are in RegularExpressionHumanBoneRetrieverTest.

Presets

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.

Change log

See CHANGELOG.

3rd party notices

See NOTICE.

License

Licensed under the MIT license.

About

Dynamically generates humanoid `UnityEngine.Avatar` from skeleton bones at runtime.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages