Document your package to help users have the best experience and optimize its use.
When you create your package with the Package Manager window, the Unity Editor creates a Documentation
folder in your package’s base folder. This folder contains one file in the Markdown format, whose lightweight syntax is used on many platforms, such as GitHub and Bitbucket. This provided Markdown file contains placeholder content and instructions to help you create the first draft of your documentation set.
As long as you have Markdown content in your package’s Documentation
folder, the layout you choose is freeform and flexible. You can write your documentation in the single file provided or you can create a more complex structure across multiple files. You can even create the documentation in HTML and host it on your own website.
After users install your package, they can access its documentation using the Documentation link in the details panel of Unity’s Package Manager window. Selecting the link attempts to open the documentation based on a property set in the package manifestEach package has a manifest, which provides information about the package to the Package Manager. The manifest contains information such as the name of the package, its version, a description for users, dependencies on other packages (if any), and other details. More info
See in Glossary file. If your documentation isn’t hosted externally, users can right-click the Documentation link to view the local version of the documentation in your package’s Documentation
folder.
To document your package:
Go to the Documentation
folder in your package’s base folder.
Open the Markdown file in your preferred script editor.
Follow the embedded instructions in the file, replacing placeholder content with your own. Optionally format the information using Markdown. The recommended sections are:
Save the file.
(Optional) If you want to host the documentation on your own website, convert the Markdown to HTML, then edit the package manifest by setting the documentationUrl
property. Set its value to the URL where you will host the documentation.
As your package evolves, consider adding more sections to your documentation. The following sections are only suggestions, but represent the types of content that quality documentation might contain.
Section | Description |
---|---|
Workflows | Include a list of steps the user can follow that demonstrates how to use the feature. You can include screenshots to help describe how to use the feature. |
Advanced topics | 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. |
Reference | 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. |
Samples | For packages that include sample files, you can include detailed information on how the user can use these sample files in their projects and scenesA Scene contains the environments and menus of your game. Think of each unique Scene file as a unique level. In each Scene, you place your environments, obstacles, and decorations, essentially designing and building your game in pieces. More info See in Glossary. |
Tutorials | If you want to offer walk-throughs for complicated procedures, you can also add them here. Use step-by-step instructions and include images if they can help the user understand. |
Feedback and support | Offer links for getting help and providing feedback, including public forums or knowledge bases, and support contacts. |
Explore the package documentation for Unity’s own released packages for ideas and inspiration.