mirror of
https://github.com/vrm-c/UniVRM.git
synced 2026-04-24 15:08:02 -05:00
SampleCopy 済みか確認する
This commit is contained in:
parent
9d4d5e97a6
commit
5a87e0a4bf
|
|
@ -1,11 +1,30 @@
|
|||
using System;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using UnityEngine;
|
||||
|
||||
namespace VRM
|
||||
{
|
||||
public static class VRMSampleCopy
|
||||
{
|
||||
struct CopyInfo
|
||||
{
|
||||
public string Src;
|
||||
public string Dst;
|
||||
|
||||
public CopyInfo(string src, string dst)
|
||||
{
|
||||
Src = src;
|
||||
Dst = dst;
|
||||
}
|
||||
}
|
||||
|
||||
static CopyInfo[] CopyList = new CopyInfo[]{
|
||||
new CopyInfo(Path.Combine(Application.dataPath, "VRM_Samples"), Path.Combine(Application.dataPath, "VRM/Samples~")),
|
||||
new CopyInfo(Path.Combine(Application.dataPath, "VRM10_Samples"), Path.Combine(Application.dataPath, "VRM10/Samples~")),
|
||||
new CopyInfo(Path.Combine(Application.dataPath, "UniGLTF_Samples"), Path.Combine(Application.dataPath, "UniGLTF/Samples~")),
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
/// Assets/VRM_Samples
|
||||
/// を
|
||||
|
|
@ -24,9 +43,10 @@ namespace VRM
|
|||
/// </summary>
|
||||
public static void Execute()
|
||||
{
|
||||
Copy(Path.Combine(Application.dataPath, "VRM_Samples"), Path.Combine(Application.dataPath, "VRM/Samples~"));
|
||||
Copy(Path.Combine(Application.dataPath, "VRM10_Samples"), Path.Combine(Application.dataPath, "VRM10/Samples~"));
|
||||
Copy(Path.Combine(Application.dataPath, "UniGLTF_Samples"), Path.Combine(Application.dataPath, "UniGLTF/Samples~"));
|
||||
foreach (var info in CopyList)
|
||||
{
|
||||
Copy(info.Src, info.Dst);
|
||||
}
|
||||
}
|
||||
|
||||
static void Copy(string srcDir, string dstDir)
|
||||
|
|
@ -61,5 +81,15 @@ namespace VRM
|
|||
throw new FileNotFoundException(src);
|
||||
}
|
||||
}
|
||||
|
||||
public static bool Validate()
|
||||
{
|
||||
return CopyList.All(x => Validate(x.Src, x.Dst));
|
||||
}
|
||||
|
||||
static bool Validate(string srcDir, string dstDir)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -187,6 +187,11 @@ namespace VRM.DevOnly.PackageExporter
|
|||
|
||||
public static void CreateUnityPackages(string outputDir)
|
||||
{
|
||||
if (!VRMSampleCopy.Validate())
|
||||
{
|
||||
throw new Exception("No Sample Copy !");
|
||||
}
|
||||
|
||||
{
|
||||
var packages = new[]{
|
||||
// VRM
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user