{"record":{"id":"d0b9f50e5919890a","repo":"Unity-Technologies/UnityCsReference","slug":"missing-name-for-0","errorCode":null,"errorMessage":"Missing name for {0}","messagePattern":"Missing name for (.+?)","errorType":"exception","errorClass":"NotImplementedException","httpStatus":null,"severity":"error","filePath":"Editor/Mono/Inspector/PlayerSettingsEditor/PlayerSettingsEditor.cs","lineNumber":4721,"sourceCode":"        }\n\n        [NoAutoStaticsCleanup] // lazy-built GUIContent cache; rebuilt on next GUI call if null\n        private static Dictionary<ApiCompatibilityLevel, GUIContent> m_NiceApiCompatibilityLevelNames;\n        [NoAutoStaticsCleanup] // lazy-built GUIContent cache; rebuilt on next GUI call if null\n        private static Dictionary<EditorAssembliesCompatibilityLevel, GUIContent> m_NiceEditorAssembliesCompatibilityLevelNames;\n        [NoAutoStaticsCleanup] // lazy-built GUIContent cache; rebuilt on next GUI call if null\n        private static Dictionary<ManagedStrippingLevel, GUIContent> m_NiceManagedStrippingLevelNames;\n\n        private static GUIContent[] GetGUIContentsForValues<T>(Dictionary<T, GUIContent> contents, T[] values)\n        {\n            var names = new GUIContent[values.Length];\n\n            for (int i = 0; i < values.Length; i++)\n            {\n                if (contents.ContainsKey(values[i]))\n                    names[i] = contents[values[i]];\n                else\n                    throw new NotImplementedException(string.Format(\"Missing name for {0}\", values[i]));\n            }\n            return names;\n        }\n\n        static GUIContent[] GetNiceScriptingBackendNames(ScriptingImplementation[] scriptingBackends)\n        {\n            return Array.ConvertAll(scriptingBackends, s => GetNiceScriptingBackendName(s));\n        }\n\n        static GUIContent GetNiceScriptingBackendName(ScriptingImplementation scriptingBackend)\n        {\n            switch (scriptingBackend)\n            {\n                case ScriptingImplementation.Mono2x:\n                    return SettingsContent.scriptingMono2x;\n                case ScriptingImplementation.IL2CPP:\n                    return SettingsContent.scriptingIL2CPP;\n                case ScriptingImplementation.CoreCLR:","sourceCodeStart":4703,"sourceCodeEnd":4739,"githubUrl":"https://github.com/Unity-Technologies/UnityCsReference/blob/225b0fbdb57cc17d094e8056b71f8314aba56f73/Editor/Mono/Inspector/PlayerSettingsEditor/PlayerSettingsEditor.cs#L4703-L4739","documentation":"Thrown by GetGUIContentsForValues when an enum value passed in has no pre-populated GUIContent mapping in the cache dictionary. Acts as a completeness assertion: every enum value must have a display name registered.","triggerScenarios":"A ManagedStrippingLevel (or other T) value is passed to GetGUIContentsForValues but was never added to the m_NiceManagedStrippingLevelNames (or sibling) dictionary. Adding a new enum value without registering its display name.","commonSituations":"Unity adds a new ManagedStrippingLevel / scripting-related enum value in an upgrade but the GUIContent cache population code lags behind. Custom build profiles exposing enum values not in the standard set.","solutions":["Register a GUIContent for every enum value in the dictionary before calling GetGUIContentsForValues.","If hitting this on upgrade, report as a Unity bug: the cache must cover all enum values.","For custom tooling, populate the dictionary with all Enum.GetValues entries with fallback names."],"exampleFix":"// before\nvar contents = GetGUIContentsForValues(cache, values); // throws on missing entry\n\n// after\nforeach (var v in values)\n    if (!cache.ContainsKey(v))\n        cache[v] = new GUIContent(v.ToString());\nvar contents = GetGUIContentsForValues(cache, values);","handlingStrategy":"validation","validationCode":"T[] values;\nbool ok = values.All(v => contents.ContainsKey(v));","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Register a GUIContent for every enum value.","Populate the dictionary from Enum.GetValues with fallback names."],"tags":["unity","editor","player-settings","gui-content","enum-mapping"],"backgroundTag":null,"analyzedSha":"225b0fbdb57cc17d094e8056b71f8314aba56f73","analyzedAt":"2026-08-13T19:07:19.849Z","schemaVersion":2},"datasetVersion":"2026-08-13T19:17:28.613Z"}