File tree Expand file tree Collapse file tree 1 file changed +4
-17
lines changed
Assets/MRTK/StandardAssets/EditorUtilities Expand file tree Collapse file tree 1 file changed +4
-17
lines changed Original file line number Diff line number Diff 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>
You can’t perform that action at this time.
0 commit comments