Skip to content

Commit

Permalink
VRCEmoteを定義
Browse files Browse the repository at this point in the history
close #58
  • Loading branch information
pandrabox committed Sep 22, 2024
1 parent 4268071 commit 640fd12
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 2 deletions.
19 changes: 18 additions & 1 deletion Editor/EmotePrefabInitializer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ public EmotePrefabInitializer(VRCAvatarDescriptor descriptor)
CreateFXObject();
CreateFXRelativeObject();
CreateSyncObject();
CreateVRCEmote();
CreateDefaultAFK();
AnimatePhysBones();
}
Expand Down Expand Up @@ -131,7 +132,7 @@ private void CreateSyncObject()
SyncObject.transform.SetParent(EmotePrefabRootTransform);
ModularAvatarParameters mparams = SyncObject.AddComponent<ModularAvatarParameters>();
string[] addBoolLocalParameters = new string[] { "CN_IS_ACTION_ACTIVE", "CN_IS_ACTION_ACTIVE_FX1", "CN_IS_ACTION_ACTIVE_FX2" };
foreach(string addBoolLocalParameter in addBoolLocalParameters)
foreach (string addBoolLocalParameter in addBoolLocalParameters)
{
mparams.parameters.Add(new ParameterConfig()
{
Expand All @@ -142,6 +143,22 @@ private void CreateSyncObject()
}
}

/// <summary>
/// エモート用パラメータ
/// </summary>
private void CreateVRCEmote()
{
SyncObject = new GameObject("VRCEmote");
SyncObject.transform.SetParent(EmotePrefabRootTransform);
ModularAvatarParameters mparams = SyncObject.AddComponent<ModularAvatarParameters>();
mparams.parameters.Add(new ParameterConfig()
{
nameOrPrefix = "VRCEmote",
syncType = ParameterSyncType.Int,
localOnly = false,
});
}

/// <summary>
/// AFK指定がない場合デフォルトAFK生成
/// </summary>
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.3.0",
"version": "1.3.1",
"displayName": "EmotePrefab",
"author": {
"name": "pandra"
Expand Down

0 comments on commit 640fd12

Please sign in to comment.