简体   繁体   English

如何在DLL中包含文档以显示Unity3D中的方法摘要?

[英]How to include documentation in DLL to show method summary in Unity3D?

I'm working on a C# DLL plugin for Unity3D. 我正在为Unity3D开发一个C#DLL插件。 Actually, the MonoDevelop tooltips (or Visual Studio) show only the structure of my method: 实际上,MonoDevelop工具提示(或Visual Studio)仅显示我的方法的结构:

在此输入图像描述

But it doesn't show my summary like this: 但它没有像我这样显示我的总结:

在此输入图像描述

Even if I documented my code: 即使我记录了我的代码:

在此输入图像描述

Is there a way to include my documentation in DLL? 有没有办法在DLL中包含我的文档?

SOLVED WITH THIS (thanks to krillgar) 解决了这个问题(感谢krillgar)

1 : Create XML documentation file on build in VisualStudio 1:在VisualStudio中构建时创建XML文档文件

在此输入图像描述

2 : Import this XML in your Assets/Plugins folder in Unity3d 2:在Unity3d的Assets / Plugins文件夹中导入此XML

You need to include the XML documentation file. 您需要包含XML文档文件。 In order to create that, you need to right-click on the Project. 要创建它,您需要右键单击项目。 Under the "Build" side tab, in the "Output" section at the bottom, check the "XML documentation file" and leave the path that it creates. 在“构建”侧选项卡下,在底部的“输出”部分中,检查“XML文档文件”并保留其创建的路径。

When you bring your DLL over, bring that .XML file along with it, and that will put the documentation into Intellisense. 当你带上你的DLL时,带上那个.XML文件,这将把文档放入Intellisense。 I'm not sure if you'll be able to use it Unity itself, but that is how you get the summary in Visual Studio. 我不确定你是否能够使用Unity本身,但这就是你在Visual Studio中获得摘要的方法。 Per probitaille's comment, you can add the XML file into the "Plugins" folder in Unity to add your comments/summaries into Unity itself. 根据probitaille的评论,您可以将XML文件添加到Unity的“插件”文件夹中,以将您的评论/摘要添加到Unity本身。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM