美好的一天。請理解我使用翻譯,因為我不會說英語。
我目前正在嘗試做的是將以下dll添加到較低版本的Nuget中,將它們放在Plugins檔案夾中,然后構建它們。
System.Memory.dll
System.Runtime.CompilerServices.Unsafe.dll
System.Text.Encoding.CodePages.dll
從Nuget 4.5.0版本一共收到三個,dll檔案從netstandard 2.0檔案夾匯入到Unity Asset的Plugins檔案夾,如Packages\System.Text.Encoding.CodePages.4.5.0\ lib\netstandard2.0.
我帶來了 dll 檔案,我想要從編輯器得到的結果很好。于是我嘗試基于此構建,出現如下錯誤。
ArgumentException: The Assembly System.Buffers is referenced by System.Memory ('Assets/Plugins/System.Memory.dll'). But the dll is not allowed to be included or could not be found.
UnityEditor.AssemblyHelper.AddReferencedAssembliesRecurse (System.String assemblyPath, System.Collections.Generic.List1[T] alreadyFoundAssemblies, System.String[] allAssemblyPaths, System.String[] foldersToSearch, System.Collections.Generic.Dictionary2[TKey,TValue] cache, UnityEditor.BuildTarget target) (at <f9102adc00864e0a9c861fc3dd597bda>:0)
UnityEditor.AssemblyHelper.FindAssembliesReferencedBy (System.String[] paths, System.String[] foldersToSearch, UnityEditor.BuildTarget target) (at <f9102adc00864e0a9c861fc3dd597bda>:0)
UnityEditor.BuildPlayerWindow:BuildPlayerAndRun()
我認為這是構建外部dll檔案時無法提出的錯誤,但我不確定該怎么做。我迫切需要幫助。請。
(僅供參考,Unity 版本是 2019.4.36f1,我嘗試的方法是將 API 兼容級別調整為 .Net 4.x 或 .Net Standard 2.0。)
uj5u.com熱心網友回復:
您的例外訊息顯示缺少程式集“System.Buffers”。
您可能需要復制 System.Buffers.dll
請參考以下鏈接, https://www.nuget.org/packages/System.Buffers/
轉載請註明出處,本文鏈接:https://www.uj5u.com/shujuku/437897.html
下一篇:如何獲取網路請求的上傳進度
