From f1828fe903feeb5e22a543016ad84f41a1585c6a Mon Sep 17 00:00:00 2001 From: ousttrue Date: Sun, 26 Aug 2018 23:45:53 +0900 Subject: [PATCH] Save blendShape assets to files --- Scripts/Format/VRMImporterContext.cs | 15 +++++++++++++++ UniGLTF | 2 +- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/Scripts/Format/VRMImporterContext.cs b/Scripts/Format/VRMImporterContext.cs index d1800518e..8430d9ce1 100644 --- a/Scripts/Format/VRMImporterContext.cs +++ b/Scripts/Format/VRMImporterContext.cs @@ -79,6 +79,21 @@ namespace VRM yield return Meta; } + + protected override UnityPath GetAssetPath(UnityPath prefabPath, UnityEngine.Object o) + { + if (o is BlendShapeAvatar + || o is BlendShapeClip) + { + var dir = prefabPath.GetAssetFolder(".BlendShapes"); + var assetPath = dir.Child(o.name.EscapeFilePath() + ".asset"); + return assetPath; + } + else + { + return base.GetAssetPath(prefabPath, o); + } + } #endif } } diff --git a/UniGLTF b/UniGLTF index 86f006b8f..d0eedb344 160000 --- a/UniGLTF +++ b/UniGLTF @@ -1 +1 @@ -Subproject commit 86f006b8f0223d8bd96037b3bbe148db0a4b4242 +Subproject commit d0eedb344ebd97586a5342ad6e16b181b9694717