restore sample unitypackage creation

This commit is contained in:
ousttrue 2025-12-08 14:34:02 +09:00
parent 018eae39c1
commit fee817ed26

View File

@ -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);
}
}