Skip to contents

If the path to Unity is not provided to a function, this function is invoked to attempt to find it. To do so, it goes through the following steps:

  1. Attempt to load the "unifir_unity_path" environment variable.

  2. Attempt to load the "unifir_unity_path" option.

Assuming that neither points to an actual file, this function will then check the default installation paths for Unity on the user's operating system. If not found, this function will error.


find_unity(unity = NULL, check_path = TRUE)



Character: If provided, this function will quote the provided string (if necessary) and return it.


Logical: If TRUE, this function will check if the Unity executable provided as an argument, environment variable, or option exists. If it does not, this function will then attempt to find one, and will error if not found. If FALSE, this function will never error.


The path to the Unity executable on the user's machine, as a length-1 character vector.


if (interactive()) {