ドキュメント

Unity Engine

Unity Engine

target

The BuildTarget to build.
読み終わるまでの所要時間 1 分最終更新 16日前

Definition

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

Remarks

For best results, leave this property unset so that the build uses the target defined in the active BuildProfile. If you do set it, set it to match the active build target.
Building a target that doesn't match the active build target is unreliable. Changing the active build target requires recompiling Editor scripts for the new platform and a domain reload, which can't happen while a build script is running. As a result, build callbacks and platform-dependent code might compile for the wrong platform, and some platforms fail to build at all.
To select the target, set the active build profile first: use the Build Profiles window in the Editor, or the
-activeBuildProfile
or
-buildTarget
argument on the command line. For more information, refer to Create a custom build script.