From 25899b75f68598cc540e4e8cd10dc7f72a8d3737 Mon Sep 17 00:00:00 2001 From: TORISOUP Date: Tue, 17 Apr 2018 02:17:13 +0900 Subject: [PATCH] fix compile error on Unity 2018 --- Scripts/Editor/VRMExportUnityPackage.cs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/Scripts/Editor/VRMExportUnityPackage.cs b/Scripts/Editor/VRMExportUnityPackage.cs index b2b0eae1a..33355adb5 100644 --- a/Scripts/Editor/VRMExportUnityPackage.cs +++ b/Scripts/Editor/VRMExportUnityPackage.cs @@ -3,6 +3,9 @@ using System.Linq; using System.Collections.Generic; using System.IO; using UnityEditor; +#if UNITY_2018_1_OR_NEWER +using UnityEditor.Build.Reporting; +#endif using UnityEngine; @@ -77,10 +80,11 @@ namespace VRM BuildTarget.StandaloneWindows, BuildOptions.None ); - if (!string.IsNullOrEmpty(build)) - { - return; - } +#if UNITY_2018_1_OR_NEWER + var iSuccess = build.summary.result != BuildResult.Succeeded; +#else + var iSuccess = !string.IsNullOrEmpty(build); +#endif var path = GetPath(PREFIX); if (File.Exists(path))