Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/unity3d/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Unity3d Unity C,在多个目标平台上使用LINQ_Unity3d - Fatal编程技术网

Unity3d Unity C,在多个目标平台上使用LINQ

Unity3d Unity C,在多个目标平台上使用LINQ,unity3d,Unity3d,在Unity中是否有任何方法可以为特定平台定义资源,而Unity在另一个构建平台上时应该忽略这些资源 我喜欢使用LINQ,但当我的目标是Web播放器时,我会收到错误消息: error CS0234: The type or namespace name `Linq' does not exist in the namespace `System.Xml'. Are you missing an assembly reference? error CS0433: The imported typ

在Unity中是否有任何方法可以为特定平台定义资源,而Unity在另一个构建平台上时应该忽略这些资源

我喜欢使用LINQ,但当我的目标是Web播放器时,我会收到错误消息:

error CS0234: The type or namespace name `Linq' does not exist in the namespace `System.Xml'. Are you missing an assembly reference?
error CS0433: The imported type `System.Xml.Linq.XDocument' is defined multiple times
我可以通过将System.Xml.Linq.dll复制到我的Plugins文件夹来解决这个问题,现在Unity知道了Linq

然后,当我将目标切换到Android时,我会收到错误消息:

error CS0234: The type or namespace name `Linq' does not exist in the namespace `System.Xml'. Are you missing an assembly reference?
error CS0433: The imported type `System.Xml.Linq.XDocument' is defined multiple times
通过从Plugins文件夹中删除System.Xml.Linq.dll可以解决此问题

我希望Unity在Android上忽略System.Xml.Linq.dll,在Web Player目标上注意它

一个让Unity在Web Player平台上看到LINQ而不将DLL复制到项目中的解决方案也可以


提前感谢

unity文档中有以下内容:


对不起,你能说得更具体一点吗?我在你的链接中看到的只是特定平台的条件代码,我没有看到任何关于文件/资源的提及?我的问题是一个DLL文件,它在不同的平台上扰乱了编译。。。它还没有涵盖DLL,在unity 5中出现:代码中也有一些选项