From 30184941cec579634661231086ccf1b722858d50 Mon Sep 17 00:00:00 2001 From: Stephen Hodgson Date: Mon, 25 Jan 2021 16:28:10 -0500 Subject: [PATCH] Added a ValidateProject method to build tools (#770) * Added a ValidateProject method to build tools * lets exit the app properly too --- .../BuildAndDeploy/UnityPlayerBuildTools.cs | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/Editor/BuildAndDeploy/UnityPlayerBuildTools.cs b/Editor/BuildAndDeploy/UnityPlayerBuildTools.cs index d9c7031cb..0aab03343 100644 --- a/Editor/BuildAndDeploy/UnityPlayerBuildTools.cs +++ b/Editor/BuildAndDeploy/UnityPlayerBuildTools.cs @@ -14,6 +14,7 @@ using UnityEngine; using XRTK.Extensions; using XRTK.Editor.Utilities; +using XRTK.Editor.Utilities.SymbolicLinks; using Debug = UnityEngine.Debug; namespace XRTK.Editor.BuildAndDeploy @@ -146,6 +147,26 @@ public static BuildReport BuildUnityPlayer(IBuildInfo buildInfo) return buildReport; } + /// + /// Validates the Unity Project assets by forcing a symbolic link sync and creates solution files. + /// + [UsedImplicitly] + public static void ValidateProject() + { + try + { + SymbolicLinker.RunSync(true); + SyncSolution(); + } + catch (Exception e) + { + Debug.LogError(e); + EditorApplication.Exit(1); + } + + EditorApplication.Exit(0); + } + /// /// Force Unity To Write Project Files ///