MRTK V2.6.1 - 全新安装 mrtk 后获取 DirectoryNotFoundException
MRTK V2.6.1 - Getting DirectoryNotFoundException after fresh install of mrtk
我今天使用 MRTK 建立了一个新的 Unity 项目。我使用的是 Unity 2020.3.26 和 MRTK 2.6.1。我通过 Microsoft 混合现实功能工具 安装了 MRTK。
安装后,像往常一样Microsoft/MRTK,我收到了无数错误。但是,我无法修复以下错误并且不知道该怎么做:
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[])
此外,我对 Microsoft 混合现实功能工具 如何安装 MRTK 感到有点困惑。安装后一切都在路径“/Packages”下是否正确? “/Assets”下没有添加文件夹。而“Packages”下的文件可以被认为是“只读”的,所以我很困惑所有的东西都在那里。
我已经找到一些关于路径限制为 260 个字符的帖子,但查看错误有 243 个字符。这仍然是问题吗?
我在文档中看到已经有 2.7.3 版本,尽管 Microsoft Mixed Reality Feature Tool 根本没有显示。在设置中,您必须激活更新,然后您只会显示 2.6.1 以上的版本。随着 2.7.3 的安装错误消失了!无论如何,我请求未来 reader 不要忽略我关于导入 mrtk 文件到“/Packages”路径的问题。
谢谢!
我今天使用 MRTK 建立了一个新的 Unity 项目。我使用的是 Unity 2020.3.26 和 MRTK 2.6.1。我通过 Microsoft 混合现实功能工具 安装了 MRTK。 安装后,像往常一样Microsoft/MRTK,我收到了无数错误。但是,我无法修复以下错误并且不知道该怎么做:
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[])
此外,我对 Microsoft 混合现实功能工具 如何安装 MRTK 感到有点困惑。安装后一切都在路径“/Packages”下是否正确? “/Assets”下没有添加文件夹。而“Packages”下的文件可以被认为是“只读”的,所以我很困惑所有的东西都在那里。
我已经找到一些关于路径限制为 260 个字符的帖子,但查看错误有 243 个字符。这仍然是问题吗?
我在文档中看到已经有 2.7.3 版本,尽管 Microsoft Mixed Reality Feature Tool 根本没有显示。在设置中,您必须激活更新,然后您只会显示 2.6.1 以上的版本。随着 2.7.3 的安装错误消失了!无论如何,我请求未来 reader 不要忽略我关于导入 mrtk 文件到“/Packages”路径的问题。 谢谢!