Skip to content

Commit

Permalink
Add write defaults pass smoke test
Browse files Browse the repository at this point in the history
  • Loading branch information
enitimeago committed Feb 4, 2024
1 parent 9fd3e06 commit 7d167e0
Show file tree
Hide file tree
Showing 5 changed files with 5,640 additions and 0 deletions.
17 changes: 17 additions & 0 deletions Packages/enitimeago.non-destructive-mmd/Tests/TestBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
public class TestBase
{
private const string CoolBananaFbxGuid = "e8dbc158ea7fccf409d337796c179e11";
private const string FXGuid = "ce6a5f803b7f200468ad1130d9594a45";

[SetUp]
public virtual void Setup()
Expand Down Expand Up @@ -48,4 +49,20 @@ protected GameObject CreateAvatarWithExpectedFaceName()
vrcAvatarDescriptor.VisemeSkinnedMesh.gameObject.name = "Body";
return avatarRootObject;
}

protected GameObject CreateAvatarWithExpectedFaceNameAndFX()
{
var avatarRootObject = CreateAvatarWithExpectedFaceName();
var vrcAvatarDescriptor = avatarRootObject.GetComponent<VRCAvatarDescriptor>();
string path = AssetDatabase.GUIDToAssetPath(FXGuid);
var animatorController = AssetDatabase.LoadAssetAtPath<RuntimeAnimatorController>(path);
Debug.Log(animatorController);
var customAnimLayer = new VRCAvatarDescriptor.CustomAnimLayer
{
type = VRCAvatarDescriptor.AnimLayerType.FX,
animatorController = animatorController
};
vrcAvatarDescriptor.baseAnimationLayers = new VRCAvatarDescriptor.CustomAnimLayer[] { customAnimLayer };
return avatarRootObject;
}
}
Loading

0 comments on commit 7d167e0

Please sign in to comment.