force build before export package

This commit is contained in:
ousttrue 2018-04-10 20:03:59 +09:00
parent 610c1223e2
commit 80ce5f0b83

View File

@ -68,6 +68,20 @@ namespace VRM
#endif
public static void CreateUnityPackage()
{
// まずビルドする
var levels = new string[] { "Assets/VRM/_RuntimeLoaderSample/VRMRuntimeLoaderSample.unity" };
var buildPath = Path.GetFullPath(Application.dataPath + "/../build/build.exe");
Debug.LogFormat("{0}", buildPath);
var build=BuildPipeline.BuildPlayer(levels,
buildPath,
BuildTarget.StandaloneWindows,
BuildOptions.None
);
if (!string.IsNullOrEmpty(build))
{
return;
}
var path = GetPath(PREFIX);
if (File.Exists(path))
{