{"record":{"id":"ccd9150b7a499cfd","repo":"Unity-Technologies/UnityCsReference","slug":"build-target-is-not-supported","errorCode":null,"errorMessage":"Build target is not supported.","messagePattern":"Build target is not supported\\.","errorType":"exception","errorClass":"BuildMethodException","httpStatus":null,"severity":"error","filePath":"Editor/Mono/BuildPlayerWindowBuildMethods.cs","lineNumber":129,"sourceCode":"        /// <summary>\n        /// Default (legacy) implementation of player window build methods.\n        /// </summary>\n        public static class DefaultBuildMethods\n        {\n            /// <summary>\n            /// Default implementation of the build player method.\n            /// </summary>\n            /// <param name=\"options\"></param>\n            public static void BuildPlayer(BuildPlayerOptions options)\n            {\n                if (!UnityConnect.instance.canBuildWithUPID)\n                {\n                    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\"))\n                        throw new BuildMethodException();\n                }\n\n                if (!BuildPipeline.IsBuildPlatformSupported(options.target))\n                    throw new BuildMethodException(\"Build target is not supported.\");\n\n                string module = ModuleManager.GetTargetStringFrom(options.target);\n                IBuildWindowExtension buildWindowExtension = ModuleManager.GetBuildWindowExtension(module);\n                if (buildWindowExtension != null && (options.options & BuildOptions.AutoRunPlayer) != 0 && !buildWindowExtension.EnabledBuildAndRunButton())\n                    throw new BuildMethodException();\n\n                if (Unsupported.IsBleedingEdgeBuild())\n                {\n                    var sb = new System.Text.StringBuilder();\n                    sb.AppendLine(\"This version of Unity is a BleedingEdge build that has not seen any manual testing.\");\n                    sb.AppendLine(\"You should consider this build unstable.\");\n                    sb.AppendLine(\"We strongly recommend that you use a normal version of Unity instead.\");\n\n                    if (EditorUtility.DisplayDialog(\"BleedingEdge Build\", sb.ToString(), \"Cancel\", \"OK\"))\n                        throw new BuildMethodException();\n                }\n\n                // See if we need to switch platforms and delay the build.  We do this whenever","sourceCodeStart":111,"sourceCodeEnd":147,"githubUrl":"https://github.com/Unity-Technologies/UnityCsReference/blob/225b0fbdb57cc17d094e8056b71f8314aba56f73/Editor/Mono/BuildPlayerWindowBuildMethods.cs#L111-L147","documentation":"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.'","triggerScenarios":"Invoking BuildPlayer(BuildPlayerOptions) for a target whose support module is not installed or whose license/platform is unavailable, so IsBuildPlatformSupported returns false.","commonSituations":"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.","solutions":["Install the platform module via Unity Hub > Add Modules.","Confirm your Unity license includes the target platform.","Verify the host OS supports building for that target; use a compatible machine/OS if not."],"exampleFix":"/* no source edit */\n// before: BuildPlayer for iOS on an editor without iOS module -> BuildMethodException\n// after: install iOS Build Support module, then BuildPlayer succeeds","handlingStrategy":"validation","validationCode":"if (!BuildPipeline.IsBuildPlatformSupported(options.target))\n    throw new InvalidOperationException($\"Target {options.target} is not supported; install its module in Unity Hub.\");","typeGuard":"static bool IsBuildSupported(BuildTarget t) => BuildPipeline.IsBuildPlatformSupported(t);","tryCatchPattern":null,"preventionTips":["Install the target's support module before building.","Verify platform license coverage for your Unity edition."],"tags":["build-player","platform-support","module-manager","license"],"backgroundTag":null,"analyzedSha":"225b0fbdb57cc17d094e8056b71f8314aba56f73","analyzedAt":"2026-08-13T19:07:19.849Z","schemaVersion":2},"datasetVersion":"2026-08-13T19:17:28.613Z"}