Unity-Technologies/UnityCsReference · error · BuildMethodException

Build target is not supported.

Error message

Build target is not supported.

What it means

In the default BuildPlayer window method, after the Unity services/UPID check, BuildPipeline.IsBuildPlatformSupported(options.target) is evaluated; if the platform reports as unsupported the build is aborted with BuildMethodException 'Build target is not supported.'

Source

Thrown at Editor/Mono/BuildPlayerWindowBuildMethods.cs:129

        /// <summary>
        /// Default (legacy) implementation of player window build methods.
        /// </summary>
        public static class DefaultBuildMethods
        {
            /// <summary>
            /// Default implementation of the build player method.
            /// </summary>
            /// <param name="options"></param>
            public static void BuildPlayer(BuildPlayerOptions options)
            {
                if (!UnityConnect.instance.canBuildWithUPID)
                {
                    if (!EditorUtility.DisplayDialog("Missing Project ID", "Because you are not a member of this project this build will not access Unity services.\nDo you want to continue?", "Yes", "No"))
                        throw new BuildMethodException();
                }

                if (!BuildPipeline.IsBuildPlatformSupported(options.target))
                    throw new BuildMethodException("Build target is not supported.");

                string module = ModuleManager.GetTargetStringFrom(options.target);
                IBuildWindowExtension buildWindowExtension = ModuleManager.GetBuildWindowExtension(module);
                if (buildWindowExtension != null && (options.options & BuildOptions.AutoRunPlayer) != 0 && !buildWindowExtension.EnabledBuildAndRunButton())
                    throw new BuildMethodException();

                if (Unsupported.IsBleedingEdgeBuild())
                {
                    var sb = new System.Text.StringBuilder();
                    sb.AppendLine("This version of Unity is a BleedingEdge build that has not seen any manual testing.");
                    sb.AppendLine("You should consider this build unstable.");
                    sb.AppendLine("We strongly recommend that you use a normal version of Unity instead.");

                    if (EditorUtility.DisplayDialog("BleedingEdge Build", sb.ToString(), "Cancel", "OK"))
                        throw new BuildMethodException();
                }

                // See if we need to switch platforms and delay the build.  We do this whenever

View on GitHub (pinned to 225b0fbdb5)

Solutions

  1. Install the platform module via Unity Hub > Add Modules.
  2. Confirm your Unity license includes the target platform.
  3. Verify the host OS supports building for that target; use a compatible machine/OS if not.

Example fix

/* no source edit */
// before: BuildPlayer for iOS on an editor without iOS module -> BuildMethodException
// after: install iOS Build Support module, then BuildPlayer succeeds
Defensive patterns

Strategy: validation

Validate before calling

if (!BuildPipeline.IsBuildPlatformSupported(options.target))
    throw new InvalidOperationException($"Target {options.target} is not supported; install its module in Unity Hub.");

Type guard

static bool IsBuildSupported(BuildTarget t) => BuildPipeline.IsBuildPlatformSupported(t);

Prevention

When it happens

Trigger: Invoking BuildPlayer(BuildPlayerOptions) for a target whose support module is not installed or whose license/platform is unavailable, so IsBuildPlatformSupported returns false.

Common situations: Building for a target (e.g. iOS, Android, console) without the matching module installed in this editor; building a target disabled by license; building on an OS that cannot host that target toolchain.

Related errors


AI-assisted analysis of Unity-Technologies/UnityCsReference@225b0fbdb5 (2026-08-13). Data as JSON: /api/errors/ccd9150b7a499cfd. Report an issue: GitHub.