mirror of
https://github.com/vrm-c/UniVRM.git
synced 2026-03-21 18:05:03 -05:00
restore sample unitypackage creation
This commit is contained in:
parent
018eae39c1
commit
fee817ed26
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user