Text formatting
Use consistent text formatting to help users distinguish between such features as code blocks, user interface (UI) elements, and hyperlinks.
Choose between regular, bold, or monospaced fontβ
Many terms at Unity have multiple contexts, including the UI and the API. It's important to use the appropriate font for the context to avoid confusion. Use the following guidelines to help you decide which font to use in different situations:
- When you discuss an idea in a general sense, use the generic term with no formatting.
- When you discuss a term in the context of the Unity UI, use bold font.
- When you discuss a term in the context of the API, use monospaced font.
Example of combined font contexts |
---|
To modify the properties of a Light component attached to a GameObject, use the controls in the Light component in the GameObject's Inspector window. Alternatively, you can change the properties in a script using the Light class properties and methods. |
Bold textβ
Use bold for the following items:
- Exact references to interactive controls and labels in the Unity UI, such as button labels, menu items, tab names, and items in inspectors. Bold only the text that appears in the UI, not the type of UI control. For example, write "Add Component button" and not "Add Component button."
- In navigation paths, separate items with a greater-than symbol (>) and don't bold the symbol. For more information about writing navigation paths, refer to User Interactions.
- Keyboard shortcuts and inputs that form part of an instruction.
- Leaders for information callouts in publishing platforms that don't have information boxes. Write the leader in bold, followed by a colon in regular font. For example, "Note:" and "Tip:"
Incorrect | Correct |
---|---|
In the main menu, go to File and then select Build Settings. | In the main menu, go to File > Build Settings. |
In the Sprite Renderer component, adjust the Color setting. | In the Sprite Renderer component, adjust the Color setting. |
Open the Mask Interaction dropdown menu and select None. | Open the Mask Interaction dropdown menu and select None. |
You can make effects like these with Particle Systems. Particle Systems are... | You can make effects like these with Particle Systems. Particle Systems are... |
As you learned in "What is post-processing?", post-processing takes the image already captured by a camera and adds effects to it. | As you learned in What is post-processing?, post-processing takes the image already captured by a camera and adds effects to it. |
Monospaced fontβ
important
Until the Learn platform supports a monospaced inline font, substitute bold.
Use monospaced font for all code that appears in your text, including terminal commands, variables, and API signatures and declarations. Write all API names in monospaced font, including classes, methods, structs, and enums. When you refer to an API in text, link to the corresponding documentation at the first use on each page. Use a code block to present code that's more than a single line.
Example usage of monospaced font |
---|
Update is the most commonly used function to implement any kind of game script. Not every MonoBehaviour script needs Update . |
Italic textβ
Don't use italic text. Italicized text can make letters harder to read, particularly on smaller displays.
Underlined textβ
important
On the Learn platform, it's necessary to add the underline format to hyperlinks.
Don't add underlining to regular text. Underlines appear on hyperlinks only.
Strikethrough textβ
Don't use strikethrough text. Strikethrough text isn't accessible to screen readers, which read out the content as regular text.
Quotation marksβ
Use quotation marks to indicate a name or text that the reader will type. Don't use quotation marks for numbers. If punctuation follows, place it outside the quotation marks.
Otherwise, use quotation marks for quotations as usual. In this case, place punctuation that is part of the quote inside the quotation marks.
Don't use quotation marks for emphasis, to refer to a word, to cast doubt (scare quotes), or to imply figurative language.
Incorrect | Correct |
---|---|
Name the cube Box. | Name the cube "Box". |
A "burst" is an event that spawns particles. | A burst is an event that spawns particles. |
Input and output variables need to have their βintentβ indicated via semantics. | Semantics indicate the intended use of input and output variables. |