buildPath
The destination path that Unity uses for the build.
Read time 1 minuteLast updated 13 days ago
Definition
- Type: Property
- Namespace: UnityEditor.Build.Profile
- Assembly: UnityEditor.CoreModule
public string buildPath { get; set; }
Remarks
Set this property to a fixed path or include variables in the path. Unity resolves each variable to the value of a public static field or property. Specify either an absolute path or a path relative to the project's root folder, which is the folder that contains the folder. Enclose each variable in square brackets and use the fully qualified member name, for example .
Assets[UnityEditor.EditorUserBuildSettings.activeBuildTarget]When you read this property, Unity replaces each variable with the string value of the corresponding member and returns the fully resolved path. When you assign a value, Unity stores it unchanged. The stored value can contain unresolved variables.
Unity applies the following rules when it resolves a variable:
- The variable must name a public static field or property that exists in a loaded assembly. Unity leaves any variable it can't resolve, including the surrounding brackets, unchanged in the path.
- Unity converts the resolved value to a string and removes any characters that aren't valid in a file name, including directory separators.
- Unity resolves variables recursively, so a resolved value can contain further variables. If any subsequent variable value refers back to an already resolved variable, Unity detects a cycle and logs a warning. In this case, Unity leaves the cyclic variable unresolved.