Skip to content

Commit 285c494

Browse files
author
davidkline-ms
committed
pr feedback
1 parent 37e26c5 commit 285c494

File tree

1 file changed

+4
-17
lines changed

1 file changed

+4
-17
lines changed

Assets/MRTK/StandardAssets/EditorUtilities/OnLoadUtilities.cs

Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,10 @@ namespace Microsoft.MixedReality.Toolkit.Utilities.Editor
1212
static class OnLoadUtilities
1313
{
1414
private const string SessionStateKey = "StandardAssetsOnLoadUtilitiesSessionStateKey";
15-
15+
16+
private const string ShaderSentinelGuid = "05852dd420bb9ec4cb7318bfa529d37c";
1617
private const string ShaderSentinelFile = "MRTK.Shaders.Sentinel";
18+
1719
private const string ShaderImportDestination = "MRTK/Shaders";
1820

1921
static OnLoadUtilities()
@@ -47,22 +49,7 @@ private static void EnsureShaders()
4749
/// <returns>True if the shader sentinel file is found, otherwise false.</returns>
4850
private static bool AssetsContainsShaders()
4951
{
50-
List<string> searchFolders = new List<string>
51-
{
52-
Application.dataPath,
53-
Path.GetFullPath("Packages")
54-
};
55-
56-
foreach (string folder in searchFolders)
57-
{
58-
DirectoryInfo di = new DirectoryInfo(folder);
59-
if (di.GetFiles(ShaderSentinelFile, SearchOption.AllDirectories).Length > 0)
60-
{
61-
return true;
62-
}
63-
}
64-
65-
return false;
52+
return string.IsNullOrWhiteSpace(AssetDatabase.GUIDToAssetPath(ShaderSentinelGuid));
6653
}
6754

6855
/// <summary>

0 commit comments

Comments
 (0)