locationPathName
Specifies the path for the application to be built.
Read time 1 minuteLast updated 4 days ago
Definition
- Type: Property
- Namespace: UnityEditor
- Assembly: UnityEditor
public string locationPathName { readonly get; set; }
Remarks
The value of determines both the location and the file name of the built application. This path can be either relative to the project directory or an absolute path.
locationPathNameUnity doesn't modify this path automatically, so you must include the correct file name and extension based on the target platform. If the directory doesn't exist, Unity creates the directory automatically during the build process.
Guidelines:
- The path must include your chosen file name. For example, for Android,
Builds/MyApp.apkfor Windows. Unity does not append extensions automatically.Builds/MyApp.exe - For Android Package, use the extension and for Android App Bundle, use the
.apkextension..aab - For Windows, use the extension.
.exe - For macOS, use the extension.
.app - If the path is relative (e.g., ), Unity will treat it as relative to the project root directory.
Builds/MyApp - To place the build outside the project directory, specify an absolute path such as .
C:/MyBuilds/MyApp.exe
Don't use the following project directories for :
locationPathName- Assets/
- ProjectSettings/
- Library/
- Packages/
- UserSettings/
Note: Paths pointing directly to the user desktop are not allowed.
For more information, refer to Platform build path reference.