subtarget
The subtarget to build. (optional)
Read time 1 minuteLast updated 10 days ago
Definition
- Type: Property
- Namespace: UnityEditor
- Assembly: UnityEditor.CoreModule
public int subtarget { readonly get; set; }
Remarks
For certain platforms, setting a non-zero value for this property can modify the build behaviour.
Both this property and _targetPlatform should remain unset to automatically use the target and subtarget as defined in the current Build Profile.
The valid values for this property correspond to target-specific enums, which are cast to ints. Examples of these enums include StandaloneBuildSubtarget, MobileTextureSubtarget, WebGLTextureSubtarget and XboxBuildSubtarget.
Usage examples:
-
For building a headless server, when building for BuildTarget.StandaloneWindows, BuildTarget.StandaloneOSX or BuildTarget.StandaloneLinux64, specify StandaloneBuildSubtarget.Server (numeric value 1).
-
For ETC2 texture compression, when building for BuildTarget.Android, or another mobile platform, specify MobileTextureSubtarget.ETC2 (numeric value 5).
Additional Resources: _subtarget, _standaloneBuildSubtarget, _androidBuildSubtarget, _webGLBuildSubtarget