modular-avatar/docs~/docs/extending.md
bd_ ddbc3b164b
chore: restructure repository to put package at top-level (#477)
* chore: rearrange package structure to have the package at the root

* ci: update CI workflows

* ci: fixing workflow bugs

* ci: recurse building .zip package

* ci: more fixes

* ci: add back in the nadena.dev VPM repo

* ci: fix tests
2023-10-08 15:39:57 +09:00

1.0 KiB

sidebar_position
10

Extending Modular Avatar

Modular Avatar can be extended by using NDM Framework. Using NDMF, you can arrange for your code to be run before or after Modular Avatar processing. Generally speaking, if you intend to generate Modular Avatar components, it's best to execute your code in the Generating phase, like so:


[assembly: ExportsPlugin(typeof(SetViewpointPlugin))]

namespace nadena.dev.ndmf.sample
{
    public class MyPlugin : Plugin<MyPlugin>
    {
        protected override void Configure()
        {
            InPhase(BuildPhase.Generating)
                .BeforePlugin("nadena.dev.modular-avatar")
                .Run("Do something", ctx => { /* ... */ });
        }
    }
}

In the future, additional APIs will be made available for deeper integration into Modular Avatar. If you have specific functionality that you want, please create an issue on our github.