Parentheses
Determine when and how to use parentheses in your writing.
Consider whether parentheses are necessary. Often, you can make your content more readable by providing the additional information as a separate clause offset by commas or as a standalone sentence.
Don’t put important information inside parentheses. Readers often ignore information in parentheses.
In text, use parentheses in the following situations:
- Defining an acronym or abbreviation for the first time. For example, “High-Definition Render Pipeline (HDRP).”
- Indicating a UI button.
- Directing users to macOS versions of navigation paths and shortcuts, when they're different than the Windows version.
- Indicating a time zone offset from UTC.
- Providing small amounts of additional information that's not necessary to the readers’ understanding of the content.
Don't write full sentences in parentheses. If the information is important enough to include, place it in a standalone sentence.
Incorrect | Correct |
---|---|
When one type (such as a class or struct) uses another type,... | |
Unity supports several Integrated Development Environments. The IDE to choose... | Unity supports several integrated development environments (IDEs). The IDE to choose... |
To open a project, go to File > Open | To open a project, go to File > Open (macOS: Unity > Open) |
Open the More â‹® menu | Open the More (â‹®) menu |
This method modifies your source asset files (these modifications aren't undoable). | This method modifies your source asset files. These modifications aren't undoable. |
This project implements basic operations (for example, print a number, print a string, add two floats and add two integers). | This project implements basic operations, such as printing a number, printing a string, adding two floats, and adding two integers. |
This function is called before any Start functions and immediately after the prefab is instantiated. (If a GameObject is inactive during start up, then Awake isn't called until it's made active.) | This function is called before any Start functions and immediately after the prefab is instantiated. If a GameObject is inactive during start up, then Awake isn't called until it's made active. |
Punctuation with parentheses​
In general, avoid using complex punctuation inside parentheses. You can use commas, but avoid complex sentence structures with colons, semicolons, or dashes.
When you use parentheses at the end of a sentence, place the period after the closing parenthesis.
For parentheses in the middle of the sentence, place any surrounding punctuation after the parentheses.
Incorrect | Correct |
---|---|
Use the arrow keys to move your character (there are four ways to move: forwards, backwards, left, and right). | Use the arrow keys to move (forwards, backwards, left, and right). |
The name for the assembly (without a file extension.) | The name for the assembly (without a file extension). |
In Chrome, (or a different browser) navigate to... | In Chrome (or a different browser), navigate to... |
macOS paths and shortcuts​
When keyboard shortcuts or paths are different between Windows and macOS systems, use parentheses to indicate the appropriate instructions for macOS.
Write the Windows version first, immediately followed by a set of parentheses that contains the string "macOS: " and the macOS version.
Incorrect | Correct |
---|---|
To build and run your game, press Ctrl+B/Cmd+B. | To build and run your game, press Ctrl+B (macOS: Cmd+B). |
To open a project, go to File > Open for Windows or Unity > Open for macOS. | To open a project, go to File > Open (macOS: Unity > Open) |
Code and methods​
Parentheses are an important part of code statements and samples. Use Unity code conventions when formatting parentheses in code. For more information about formatting parentheses in code, refer to Code style and formatting on the Content Operations website.
Don't use parentheses when you refer to an API method in text. If you need to refer to specific method overloads or generic versions, make sure that the context is clear in the text.
Incorrect | Correct |
---|---|
Call the Apply() method to... | Call the Apply method to... |