I have set up a new Unity project with MRTK today. I'm using Unity 2020.3.26 and MRTK 2.6.1. I installed MRTK via the Microsoft Mixed Reality Feature Tool. Immediately after installation, as usual with Microsoft/MRTK, I was greeted with countless errors. However, I could not fix the following error and do not know what to do:
System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\Users\[Username]\source\repos\[Folder]\Unity\[Folder]\Library\PackageCache\com.microsoft.mixedreality.toolkit.foundation@2a959d4b1c8c-1621237827345\SDK\Experimental\InteractiveElement\Examples\Scripts\CustomStateExample\KeyboardState'.
at System.IO.__Error.WinIOError (System.Int32 errorCode, System.String maybeFullPath) [0x000f7] in <695d1cc93cca45069c528c15c9fdd749>:0
at System.IO.FileSystemEnumerableIterator`1[TSource].HandleError (System.Int32 hr, System.String path) [0x00006] in <695d1cc93cca45069c528c15c9fdd749>:0
at System.IO.FileSystemEnumerableIterator`1[TSource].CommonInit () [0x00054] in <695d1cc93cca45069c528c15c9fdd749>:0
at System.IO.FileSystemEnumerableIterator`1[TSource]..ctor (System.String path, System.String originalUserPath, System.String searchPattern, System.IO.SearchOption searchOption, System.IO.SearchResultHandler`1[TSource] resultHandler, System.Boolean checkHost) [0x000d6] in <695d1cc93cca45069c528c15c9fdd749>:0
at System.IO.FileSystemEnumerableFactory.CreateFileNameIterator (System.String path, System.String originalUserPath, System.String searchPattern, System.Boolean includeFiles, System.Boolean includeDirs, System.IO.SearchOption searchOption, System.Boolean checkHost) [0x00009] in <695d1cc93cca45069c528c15c9fdd749>:0
at System.IO.Directory.InternalGetFileDirectoryNames (System.String path, System.String userPathOriginal, System.String searchPattern, System.Boolean includeFiles, System.Boolean includeDirs, System.IO.SearchOption searchOption, System.Boolean checkHost) [0x00000] in <695d1cc93cca45069c528c15c9fdd749>:0
at System.IO.Directory.InternalGetFiles (System.String path, System.String searchPattern, System.IO.SearchOption searchOption) [0x00000] in <695d1cc93cca45069c528c15c9fdd749>:0
at System.IO.Directory.GetFiles (System.String path, System.String searchPattern) [0x0001c] in <695d1cc93cca45069c528c15c9fdd749>:0
at System.IO.DirectoryInfo.GetFiles (System.String searchPattern) [0x0000e] in <695d1cc93cca45069c528c15c9fdd749>:0
at System.IO.DirectoryInfo.GetFilesSubdirs (System.Collections.ArrayList l, System.String pattern) [0x00002] in <695d1cc93cca45069c528c15c9fdd749>:0
[ ... ]
at System.IO.DirectoryInfo.GetFilesSubdirs (System.Collections.ArrayList l, System.String pattern) [0x0002f] in <695d1cc93cca45069c528c15c9fdd749>:0
at System.IO.DirectoryInfo.GetFiles (System.String searchPattern, System.IO.SearchOption searchOption) [0x00017] in <695d1cc93cca45069c528c15c9fdd749>:0
at (wrapper remoting-invoke-with-check) System.IO.DirectoryInfo.GetFiles(string,System.IO.SearchOption)
at Microsoft.MixedReality.Toolkit.Utilities.Editor.OnLoadUtilities.FindShaderFolderInPackage () [0x0004c] in C:\Users\[Username]\source\repos\[Folder]\Unity\[Folder]\Library\PackageCache\com.microsoft.mixedreality.toolkit.standardassets@570a6e7bd8eb-1621237819262\EditorUtilities\OnLoadUtilities.cs:152
at Microsoft.MixedReality.Toolkit.Utilities.Editor.OnLoadUtilities.EnsureShaders (System.Boolean bypassIgnore) [0x00000] in C:\Users\[Username]\source\repos\[Folder]\Unity\[Folder]\Library\PackageCache\com.microsoft.mixedreality.toolkit.standardassets@570a6e7bd8eb-1621237819262\EditorUtilities\OnLoadUtilities.cs:42
at Microsoft.MixedReality.Toolkit.Utilities.Editor.OnLoadUtilities..cctor () [0x00000] in C:\Users\[Username]\source\repos\[Folder]\Unity\[Folder]\Library\PackageCache\com.microsoft.mixedreality.toolkit.standardassets@570a6e7bd8eb-1621237819262\EditorUtilities\OnLoadUtilities.cs:23
UnityEditor.EditorAssemblies:ProcessInitializeOnLoadAttributes (System.Type[])
Furthermore, I am a bit confused as to how the Microsoft Mixed Reality Feature Tool installed MRTK. Is it correct that after the installation everything ended up under the path "/Packages"? No folders were added under "/Assets". And the files under "Packages" can be considered "read only", so I'm confused that everything ended up there.
What I already found were some posts about the limitation of 260 characters for the path, but looking at the error there are 243 characters. Can this still be the problem?
I saw in the documentation that there is already version 2.7.3, although Microsoft Mixed Reality Feature Tool does not show that at all. In the settings you have to activate the update and then you only get a version above 2.6.1 displayed. With the installation of 2.7.3 the error is gone! Regardless, I ask the future reader not to ignore my question about the imported mrtk files into the "/Packages" path. Thank you!