diff --git a/Packages/VRM/Editor/VRMExportUnityPackage.cs b/Packages/VRM/Editor/VRMExportUnityPackage.cs index 6971976b7..73edcb435 100644 --- a/Packages/VRM/Editor/VRMExportUnityPackage.cs +++ b/Packages/VRM/Editor/VRMExportUnityPackage.cs @@ -225,6 +225,13 @@ namespace VRM.DevOnly.PackageExporter new GlobList("Packages/VRM"), } }, + // VRM_Samples + new PackageInfo("UniVRM_Samples") + { + List = new []{ + new GlobList("Assets/VRM_Samples"), + } + }, // VRM-1.0 new PackageInfo("VRM") { @@ -233,6 +240,13 @@ namespace VRM.DevOnly.PackageExporter new GlobList("Packages/VRM10"), } }, + // VRM-1.0_Samples + new PackageInfo("VRM_Samples") + { + List = new []{ + new GlobList("Assets/VRM10_Samples"), + } + }, }; foreach (var package in packages) { @@ -255,18 +269,25 @@ namespace VRM.DevOnly.PackageExporter private static string FilePathToPackage(string src) { var items = src.Split("/"); - if (items[0] != "Packages") + switch (items[0]) { - throw new ArgumentException(src); - } - if (PkgMap.TryGetValue(items[1], out var pkg)) - { - items[1] = pkg; - return string.Join("/", items); - } - else - { - throw new ArgumentException(src); + case "Assets": + // pass through(for sample package) + return src; + + case "Packages": + if (PkgMap.TryGetValue(items[1], out var pkg)) + { + items[1] = pkg; + return string.Join("/", items); + } + else + { + throw new ArgumentException(src); + } + + default: + throw new ArgumentException(src); } }