开发者

Unity3d and System.Xml.Linq

So even though the Unity\Editor\Data\Mono\lib\mono\2.0\System.Xml.Linq.dll file exists, doing:

using System.Xml.Linq;

generates the following error: "The type or namespace name 'Linq' does not exist in the namespace 'Sys开发者_JAVA百科tem.Xml'.

What can I do to implement this?


You also need to reference the Namespace by right clicking References and selecting the namespace.


I know this post is a little old but I thought this may perhaps help someone coming across this post.

If you want to add a third party dll to a project in unity, the best method is usually to add it to the \Assets\Plugins folder, and it'll be included automatically as a reference in your -csharp.sln file. Adding libraries this way ensures you overcome compile order issues when dealing with UnityScript, and ensures that copies of your projects come with their dependencies.

The "Plugins" folder is where you must put any native plugins, which you want to be accessible by your scripts. They will also be automatically included in your build. In Windows, native plugins exist as .dll files, in Mac OS X, they are .bundle files, and in Linux, they are .so files. Like the Standard Assets folder, any scripts in here are compiled earlier, allowing them to be accessed by other scripts (of any language) that are outside the Plugins folder. - http://wiki.unity3d.com/index.php/Special_Folder_Names_in_your_Assets_Folder

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜