Skip to content
This repository has been archived by the owner on Aug 11, 2024. It is now read-only.

Commit

Permalink
Added a ValidateProject method to build tools (#770)
Browse files Browse the repository at this point in the history
* Added a ValidateProject method to build tools

* lets exit the app properly too
  • Loading branch information
StephenHodgson authored Jan 25, 2021
1 parent fac015b commit 3018494
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions Editor/BuildAndDeploy/UnityPlayerBuildTools.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -146,6 +147,26 @@ public static BuildReport BuildUnityPlayer(IBuildInfo buildInfo)
return buildReport;
}

/// <summary>
/// Validates the Unity Project assets by forcing a symbolic link sync and creates solution files.
/// </summary>
[UsedImplicitly]
public static void ValidateProject()
{
try
{
SymbolicLinker.RunSync(true);
SyncSolution();
}
catch (Exception e)
{
Debug.LogError(e);
EditorApplication.Exit(1);
}

EditorApplication.Exit(0);
}

/// <summary>
/// Force Unity To Write Project Files
/// </summary>
Expand Down

0 comments on commit 3018494

Please sign in to comment.