Skip to main content

Relative pronouns

Avoid ambiguity when using the relative pronouns "which," "that," and "who."

Relative pronouns introduce information about a subject that has already been mentioned. Use relative pronouns to refer only to specfic noun phrases.

Which​

When you use "which" as a relative pronoun, make sure that it refers to a specific noun phrase. Don’t use "which" to refer to an entire sentence, clause, or abstract idea.

Using "which" to refer to an entire clause or an idea can cause confusion when there are multiple things that “which” could refer to. Many languages do not have relative pronouns that can be used in the same way. Content that uses "which" in this way takes much more time and effort to translate.

You often need to significantly restructure your sentence to avoid these constructions.

IncorrectCorrect

In the following sentence, "which" refers clearly to "convex hull":

Marking the mesh collider as Convex in the Inspector window generates the collider shape as a convex hull, which is similar to the original mesh but with any undercuts filled in.

You can add or remove components at runtime, which can be useful for procedurally creating GameObjects, or modifying how a GameObject behavesTo procedurally create GameObjects or modify how they behave, you can add or remove components at runtime.
Typically, you want to assign the component to a variable, which is done using the following code. In the following example the script gets a reference to a Rigidbody component on the same GameObject:

Typically, you want to assign the component to a variable. You can do so using the following code. In this example, the script gets a reference to a Rigidbody component on the same GameObject:

Alternatively, rewrite the paragraph to be more concise:

Typically, you want to assign the component to a variable. The following code shows you how to get a reference to a Rigidbody component on the same GameObject:

These guidelines apply when you use "which" to refer to an entire sentence clause. You don’t need to rewrite sentences where "which" is used as an adjective or an interrogative. For example, the following sentences are acceptable:

  • Dynamic resolution support depends on which render pipeline your project uses.
  • Which versions of Unity support this package?

Which vs. that​

"Which" and "that" have similar functions as relative pronouns but they are not interchangeable. Choosing one or the other requires different punctuation and changes the meaning of the sentence.

Relative pronouns introduce relative clauses. Relative clauses provide extra information about a subject that is introduced earlier in the sentence. There are two types of relative clauses: restrictive and nonrestrictive.

The following table shows you which relative pronoun to use with each type of clause:

Clause typePronounExplanationExample
Restrictivethat

Use to provide information that is essential to the meaning of the sentence. If you remove the clause, the meaning of the sentence changes substantially.

Don't use punctuation to separate restrictive clause from the main clause.

  • Unity displays a warning message if you try to remove a component that another GameObject depends on.
  • You need to modify the script that you downloaded in the previous step.

Nonrestrictivewhich

Use to provide additional information that is not essential. You can remove a nonrestrictive clause without changing the overall meaning of the sentence.

Introduce nonrestrictive clauses with "which" and use commas to set them apart from the main clause.

  • The full-length description, which is shown on the app stores, is mandatory.
  • Package Manager uses a global configuration file named upmconfig.toml, which you can find in the following locations:

Who​

Always use the pronoun "who" when you refer to a person or group of people. Don’t use "that."

IncorrectCorrect
For users that require full control over the processing of downloaded data, Unity provides the DownloadHandlerScript class.For users who require full control over the processing of downloaded data, Unity provides the DownloadHandlerScript class.
Unity displays information about the user that performed the reset.Unity displays information about the user who performed the reset.