Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


subtarget

The Subtarget to build.
Read time 1 minuteLast updated 6 days ago

Definition

  • Type: Property
  • Namespace: UnityEditor
  • Assembly: UnityEditor.CoreModule
public int subtarget { readonly get; set; }

Remarks

If you only set _target and not _subtarget, this defaults to the platform's default subtarget.
Setting this property persists the value in EditorUserBuildSettings, which overwrites the current Editor subtarget. This behavior also affects an active BuildProfile. When using a build profile, use BuildPlayerWithProfileOptions instead.
Both this property and _target 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 enum types, which are stored as integers. Examples of these enum types include StandaloneBuildSubtarget, MobileTextureSubtarget, WebGLTextureSubtarget and XboxBuildSubtarget.
Usage examples: