Unity 5.1.1错误:不允许包含或无法找到dll

时间:2015-06-23 11:05:05

标签: ios dll unity3d

我是团结一致并使用Unity 5.1.1升级我的应用之一。它在4.6.2下工作正常,但升级后我得到了跟随错误

ArgumentException: The Assembly UnityEditor is referenced by iGUI ('Assets/lib/igui/Runtime/iGUI.dll'). But the dll is not allowed to be included or could not be found.
UnityEditor.AssemblyHelper.AddReferencedAssembliesRecurse (System.String assemblyPath, System.Collections.Generic.List`1 alreadyFoundAssemblies, System.String[] allAssemblyPaths, System.String[] foldersToSearch, System.Collections.Generic.Dictionary`2 cache, BuildTarget target) (at /Users/builduser/buildslave/unity/build/Editor/Mono/AssemblyHelper.cs:154)
UnityEditor.AssemblyHelper.AddReferencedAssembliesRecurse (System.String assemblyPath, System.Collections.Generic.List`1 alreadyFoundAssemblies, System.String[] allAssemblyPaths, System.String[] foldersToSearch, System.Collections.Generic.Dictionary`2 cache, BuildTarget target) (at /Users/builduser/buildslave/unity/build/Editor/Mono/AssemblyHelper.cs:160)
UnityEditor.AssemblyHelper.FindAssembliesReferencedBy (System.String[] paths, System.String[] foldersToSearch, BuildTarget target) (at /Users/builduser/buildslave/unity/build/Editor/Mono/AssemblyHelper.cs:192)
UnityEditor.HostView:OnGUI()

我尝试更改" .net 2.0子集"的兼容性到" .net 2.0",但那没有用。

任何帮助将不胜感激

提前致谢

1 个答案:

答案 0 :(得分:4)

我在尝试构建包含自定义DLL的游戏时遇到了类似的问题,尽管我的错误信息略有不同。

ArgumentException: The Assembly UnityEditor is referenced by Namespace.In.MyCustom.Dll ('Assets/Dlls/MyCustom.dll'). But the dll is not allowed to be included or could not be found.
UnityEditor.AssemblyHelper.AddReferencedAssembliesRecurse (System.String assemblyPath, System.Collections.Generic.List`1 alreadyFoundAssemblies, System.String[] allAssemblyPaths, System.String[] foldersToSearch, System.Collections.Generic.Dictionary`2 cache, BuildTarget target) (at C:/buildslave/unity/build/Editor/Mono/AssemblyHelper.cs:156)
UnityEditor.AssemblyHelper.FindAssembliesReferencedBy (System.String[] paths, System.String[] foldersToSearch, BuildTarget target) (at C:/buildslave/unity/build/Editor/Mono/AssemblyHelper.cs:194)
UnityEditor.HostView:OnGUI()

我的DLL引用了 UnityEditor.dll ,它不包含在Unity游戏的任何分发版本中。 我通过选择Unity中的MyCustom.dll解决了这个问题,并通过取消选中“Any Platform”(参见图片)停止将其包含在构建过​​程中。

dll import settings

如果您referenced functionality of UnityEditor.dll in one of your GameObjects,您可能需要尝试platform dependent compilation