Version: 2023.2
符合法律要求
共享包

为您的软件包撰写文档

大多数软件包都需要某种形式的注解,以帮助用户获得最佳体验并优化其使用。本页面提供了一些有关如何结构化信息格式化文档提示。

信息的结构

After the title of the package, give a basic overview of the package and its contents. Following the overview and package contents, include instructions for installing, system requirements, and limitations. You can also offer links for getting help and providing feedback, including public forums or knowledge bases, and support contacts.

After this preliminary information, you can offer more in-depth workflows, description of the user interface or directory listings for samples, and then more advanced topics. It’s best to offer reference pages near the end.

部分 描述
概述 A brief, high-level explanation of the package.
软件包内容 Include the location of important files you want the user to know about. For example, if this is a sample package containing textures, models, and materials separated by sample group, you might want to specify the folder location of each group.
安装说明 您可以提供指向官方的 Package Manager 安装说明的链接,但是如果您有任何特殊的安装需求,比如安装示例,可以在这里添加。
要求 这是添加硬件或软件要求合适的位置,包括此软件包与哪些版本的 Unity 编辑器兼容。
限制 如果您的软件包有任何已知限制,可在此处列出。如果没有限制,或者限制是微不足道的,可去除此部分。
工作流程 Include a list of steps that the user can follow that demonstrates how to use the feature. You can include screenshots to help describe how to use the feature.
高级主题 Detailed information about what you’re providing to users. This is ideal if you don’t want to overwhelm the user with too much information up front.
参考 If you have a user interface with a lot of properties, you can describe their details in a reference section. Using tables is a good way to offer specific property descriptions.
示例 对于包含示例文件的软件包,您可以包含有关用户如何在其项目和场景中使用这些示例文件的详细信息。
教程 If you want to offer walkthroughs for complicated procedures, you can also add them here. Use step-by-step instructions and include images if they can help the user understand.

文档格式

Markdown is a lightweight format commonly used in packages. Many repository hosting services (such as GitHub and Bitbucket) support Markdown for README files and documentation sites. You can include a Markdown file in the Documentation~ folder under your package root. Then, when a user clicks the Documentation link in the details panel of Unity’s Package Manager window, the user’s default Markdown viewer opens the file.

You can also use your own website to host your documentation. To set the location for the Documentation link to point to your own website, set it with the documentationUrl property in your package.json file.

If you decide to use Markdown to document your package, you can find information about writing Markdown files from many sites, including:

符合法律要求
共享包