From fee817ed26f4657b5f6138a2dd50bb43bee57d6b Mon Sep 17 00:00:00 2001 From: ousttrue Date: Mon, 8 Dec 2025 14:34:02 +0900 Subject: [PATCH] restore sample unitypackage creation --- Packages/VRM/Editor/VRMExportUnityPackage.cs | 43 +++++++++++++++----- 1 file changed, 32 insertions(+), 11 deletions(-) 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); } }