Skip to content

Commit

Permalink
対象のPrefabがアバターにない場合にもメニューを生成する不具合を修正
Browse files Browse the repository at this point in the history
  • Loading branch information
pandrabox committed Sep 29, 2024
1 parent 1ecc15e commit cc9eb07
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 8 additions & 0 deletions Editor/EmotePrefabPlugin.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
using nadena.dev.ndmf;
using com.github.pandrabox.emoteprefab.editor;
using com.github.pandrabox.emoteprefab.runtime;
using System.Linq;
using System.Diagnostics;
using static com.github.pandrabox.emoteprefab.runtime.Generic;

[assembly: ExportsPlugin(typeof(EmotePrefabPlugin))]

Expand All @@ -11,6 +15,10 @@ protected override void Configure()
{
InPhase(BuildPhase.Transforming).BeforePlugin("nadena.dev.modular-avatar").Run("com.github.pandrabox.emoteprefab", ctx =>
{
if (ctx.AvatarRootTransform.GetComponentsInChildren<EmotePrefab>(false).Length==0)
{
return;
}
new EmotePrefabProcessor(ctx.AvatarDescriptor);
});
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "com.github.pandrabox.emoteprefab",
"version": "1.4.1",
"version": "1.4.2",
"displayName": "EmotePrefab",
"author": {
"name": "pandra"
Expand Down

0 comments on commit cc9eb07

Please sign in to comment.