Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
bdunderscore authored Sep 10, 2023
1 parent be4d76e commit bac6089
Showing 1 changed file with 2 additions and 12 deletions.
14 changes: 2 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,21 +26,11 @@ A minimal plugin definition looks a bit like this:

namespace nadena.dev.ndmf.sample
{
public class SetViewpointPlugin : Plugin<SetViewpointPlugin>
public class MyPlugin : Plugin<MyPlugin>
{
public override string QualifiedName => "nadena.dev.av3-build-framework.sample.set-viewpoint";
protected override void Configure()
{
InPhase(BuildPhase.Transforming).Run("Set viewpoint", ctx =>
{
var obj = ctx.AvatarRootObject.GetComponentInChildren<SetViewpoint>();
if (obj != null)
{
ctx.AvatarDescriptor.ViewPosition =
Quaternion.Inverse(ctx.AvatarRootTransform.rotation) * (
obj.transform.position - ctx.AvatarRootTransform.position);
}
});
InPhase(BuildPhase.Transforming).Run("Do something", ctx => { /* ... */ });
}
}
}
Expand Down

0 comments on commit bac6089

Please sign in to comment.