Unity-Technologies/UnityCsReference · error · ArgumentException
Scripting backend value {scriptingBackend} is not supported.
Error message
Scripting backend value {scriptingBackend} is not supported. What it means
Thrown by GetNiceScriptingBackendName when a ScriptingImplementation value is not Mono2x, IL2CPP, or CoreCLR. The switch is meant to be exhaustive over the supported scripting backends; any other value is unsupported.
Source
Thrown at Editor/Mono/Inspector/PlayerSettingsEditor/PlayerSettingsEditor.cs:4742
}
static GUIContent[] GetNiceScriptingBackendNames(ScriptingImplementation[] scriptingBackends)
{
return Array.ConvertAll(scriptingBackends, s => GetNiceScriptingBackendName(s));
}
static GUIContent GetNiceScriptingBackendName(ScriptingImplementation scriptingBackend)
{
switch (scriptingBackend)
{
case ScriptingImplementation.Mono2x:
return SettingsContent.scriptingMono2x;
case ScriptingImplementation.IL2CPP:
return SettingsContent.scriptingIL2CPP;
case ScriptingImplementation.CoreCLR:
return SettingsContent.scriptingCoreCLR;
default:
throw new ArgumentException($"Scripting backend value {scriptingBackend} is not supported.", nameof(scriptingBackend));
}
}
private static GUIContent[] GetNiceApiCompatibilityLevelNames(ApiCompatibilityLevel[] apiCompatibilityLevels)
{
if (m_NiceApiCompatibilityLevelNames == null)
{
m_NiceApiCompatibilityLevelNames = new Dictionary<ApiCompatibilityLevel, GUIContent>
{
{ ApiCompatibilityLevel.NET_Unity_4_8, SettingsContent.apiCompatibilityLevel_NET_FW_Unity },
{ ApiCompatibilityLevel.NET_Standard, SettingsContent.apiCompatibilityLevel_NET_Standard },
// ApiCompatibilityLevel.NET is intentionally Obsolete/hidden for now, but still needs a display name here.
#pragma warning disable 618
{ ApiCompatibilityLevel.NET, SettingsContent.apiCompatibilityLevel_NET_10 },
#pragma warning restore 618
};
}
View on GitHub (pinned to 225b0fbdb5)
Solutions
- Ensure the ScriptingImplementation is one of Mono2x, IL2CPP, or CoreCLR for the active editor build.
- Install the platform backend module if a required backend is missing.
- Guard before calling: validate against the supported set and use a default.
Example fix
// before
var name = GetNiceScriptingBackendName(backend);
// after
var supported = backend == ScriptingImplementation.Mono2x
|| backend == ScriptingImplementation.IL2CPP
|| backend == ScriptingImplementation.CoreCLR;
if (!supported) { Debug.LogWarning($"Unsupported backend {backend}"); backend = ScriptingImplementation.IL2CPP; }
var name = GetNiceScriptingBackendName(backend); Defensive patterns
Strategy: validation
Validate before calling
bool IsSupportedBackend(ScriptingImplementation b) =>
b == ScriptingImplementation.Mono2x || b == ScriptingImplementation.IL2CPP || b == ScriptingImplementation.CoreCLR; Type guard
static bool IsSupportedBackend(ScriptingImplementation b) =>
b == ScriptingImplementation.Mono2x || b == ScriptingImplementation.IL2CPP || b == ScriptingImplementation.CoreCLR; Prevention
- Restrict to Mono2x/IL2CPP/CoreCLR.
- Install missing platform backend modules.
When it happens
Trigger: Calling GetNiceScriptingBackendName with a ScriptingImplementation that is not currently supported (e.g. a disabled/preview backend). A build profile or platform exposing a backend the editor build does not include.
Common situations: Platform-specific scripting backends not installed. Enum values from a newer Unity version rendered by an older editor. Custom player settings scripting that sets an unsupported backend.
Related errors
- Missing name for {0}
- Unhandled scripting backend {scriptingBackend}
- Attempting to set an incorrect number of icons for {namedBui
- The setting label can't be null or empty.
- Unknown scripting backend:{scriptingBackend}
AI-assisted analysis of Unity-Technologies/UnityCsReference@225b0fbdb5 (2026-08-13).
Data as JSON: /api/errors/d9f8b9ec872fd589.
Report an issue: GitHub.