From 80ce5f0b839fc5d6289e3b27964e9871a4400a3e Mon Sep 17 00:00:00 2001 From: ousttrue Date: Tue, 10 Apr 2018 20:03:59 +0900 Subject: [PATCH] force build before export package --- Scripts/Editor/VRMExportUnityPackage.cs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/Scripts/Editor/VRMExportUnityPackage.cs b/Scripts/Editor/VRMExportUnityPackage.cs index 0f000732f..b2b0eae1a 100644 --- a/Scripts/Editor/VRMExportUnityPackage.cs +++ b/Scripts/Editor/VRMExportUnityPackage.cs @@ -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)) {