Creating clear, concise, and well-structured user manual pages is essential for helping developers effectively use the Kanda SDK. This guideline outlines the best practices and standards for writing user manuals.
Structure
A typical user manual page should be placed in the Documentation~
folder and follow this structure:
- Title: The title should be descriptive and reflect the content of the page.
- Introduction: Briefly introduce the feature or topic.
- Sections: Divide the content into logical sections with appropriate headings.
- Examples: Provide code examples to illustrate usage.
Title
The title should be clear and concise, accurately reflecting the content of the page. Use sentence case for titles.
Example:
\page player-progress Player Progress System
Introduction
The introduction should provide a brief overview of the feature or topic, explaining its purpose and relevance.
Example:
The Player Progress System allows you to save and load the player's progress, including level, score, and achievements.
Sections
Divide the content into logical sections with appropriate headings. Use H2 (`##`) for main sections and H3 (`###`) for subsections.
Example:
## Saving Progress
To save the player's progress, use the `SaveProgress` method provided by the `PlayerProgressManager` class.
### Usage
```csharp
PlayerProgress progress = new PlayerProgress();
progress.level = 5;
progress.score = 1000;
PlayerProgressManager.SaveProgress(progress);
```
Examples
Provide clear and concise code examples to illustrate how to use the feature. Ensure the examples are relevant and demonstrate typical use cases.
Example:
### Example
Here is a complete example demonstrating how to save and load player progress:
```csharp
public class PlayerProgressExample : MonoBehaviour {
void Start() {
PlayerProgress progress = new PlayerProgress();
progress.level = 5;
progress.score = 1000;
PlayerProgressManager.SaveProgress(progress);
PlayerProgress loadedProgress = PlayerProgressManager.LoadProgress();
KandaLog.Write("Level: " + loadedProgress.level);
KandaLog.Write("Score: " + loadedProgress.score);
}
}
```
Best Practices
- Be Concise: Keep the content concise and to the point.
- Be Clear: Use clear and simple language. Avoid jargon and complex sentences.
- Be Consistent: Follow the established conventions for structure, formatting, and code style.
- Use Examples: Provide relevant and practical code examples.
- Review and Test: Review the content for accuracy and completeness. Test the code examples to ensure they work as intended.
By following these guidelines, you can create effective user manuals that help developers make the most of the Kanda SDK.