{"record":{"id":"2c6288ed458cb884","repo":"Unity-Technologies/UnityCsReference","slug":"unknown-editorplugincpuarchitecture-value-archit","errorCode":null,"errorMessage":"Unknown EditorPluginCPUArchitecture value: {architecture}","messagePattern":"Unknown EditorPluginCPUArchitecture value: (.+?)","errorType":"exception","errorClass":"NotSupportedException","httpStatus":null,"severity":"error","filePath":"Editor/Mono/ImportSettings/EditorPluginImporterExtension.cs","lineNumber":132,"sourceCode":"                    currentOS = osValue;\n                }\n            }\n\n            static string GetArchitectureName(EditorPluginOSArchitecture os, EditorPluginCPUArchitecture architecture)\n            {\n                switch (architecture)\n                {\n                    case EditorPluginCPUArchitecture.x86_64:\n                        return os == EditorPluginOSArchitecture.OSX ? \"Intel 64-bit\" : \"x64\";\n\n                    case EditorPluginCPUArchitecture.ARM64:\n                        return os == EditorPluginOSArchitecture.OSX ? \"Apple silicon\" : \"Arm64\";\n\n                    case EditorPluginCPUArchitecture.AnyCPU:\n                        return \"Any CPU\";\n\n                    default:\n                        throw new NotSupportedException(\"Unknown EditorPluginCPUArchitecture value: \" + architecture);\n                }\n            }\n        }\n\n        private CPUProperty editorCPUProperty;\n        private EditorProperty editorOSProperty;\n\n        public EditorPluginImporterExtension() : base(null)\n        {\n            editorCPUProperty = new CPUProperty(EditorGUIUtility.TrTextContent(\"CPU\", \"The processor architectiure that this plugin is compatible with\"), \"CPU\", EditorPluginCPUArchitecture.AnyCPU, (Enum e) => CanSelectArch(e));\n            editorOSProperty = new EditorProperty(EditorGUIUtility.TrTextContent(\"OS\", \"The Editor operating system that this plugin is compatible with\"), \"OS\", EditorPluginOSArchitecture.AnyOS);\n\n            properties = new Property[] { editorOSProperty, editorCPUProperty };\n        }\n\n        public override void OnPlatformSettingsGUI(PluginImporterInspector inspector)\n        {\n            EditorGUI.BeginChangeCheck();","sourceCodeStart":114,"sourceCodeEnd":150,"githubUrl":"https://github.com/Unity-Technologies/UnityCsReference/blob/225b0fbdb57cc17d094e8056b71f8314aba56f73/Editor/Mono/ImportSettings/EditorPluginImporterExtension.cs#L114-L150","documentation":"Mirrors error 343 but for EditorPluginCPUArchitecture. The switch handles x86_64, ARM64, and AnyCPU; the default branch throws NotSupportedException for an unrecognized value. Editor plugins run in the editor process, so this enum is narrower than the desktop player one.","triggerScenarios":"An EditorPluginCPUArchitecture value outside {x86_64, ARM64, AnyCPU} is deserialized or passed into the CPU label resolver — e.g. a value from a different/newer Unity or a corrupted serialized state.","commonSituations":"Opening a project on an editor whose host-architecture enum differs (e.g. a build that dropped x86 support). Stale serialized editor-plugin compatibility data after an upgrade.","solutions":["Reimport the editor plugin so its architecture is re-detected for the current host.","Reset the OS/CPU compatibility in the plugin inspector to AnyCPU and reapply.","Upgrade/downgrade to match the Unity version that produced the asset.","In a fork, extend the switch to cover the additional enum member."],"exampleFix":"// before: unknown EditorPluginCPUArchitecture -> default throws\n\n// after\nimp.SetPlatformData(\"Editor\", \"CPU\", nameof(EditorPluginCPUArchitecture.AnyCPU));","handlingStrategy":"type-guard","validationCode":"if (!Enum.IsDefined(typeof(EditorPluginCPUArchitecture), architecture))\n    architecture = EditorPluginCPUArchitecture.AnyCPU;","typeGuard":"static bool IsKnown(EditorPluginCPUArchitecture a) =>\n    a == EditorPluginCPUArchitecture.x86_64 || a == EditorPluginCPUArchitecture.ARM64 ||\n    a == EditorPluginCPUArchitecture.AnyCPU;","tryCatchPattern":null,"preventionTips":["Reset editor-plugin CPU to AnyCPU when opening a project from a mismatched Unity version.","Reimport editor plugins so architecture is re-detected for the host.","Extend the switch when adding enum members in a fork."],"tags":["plugin-importer","enum","cpu-architecture","editor","version-skew"],"backgroundTag":null,"analyzedSha":"225b0fbdb57cc17d094e8056b71f8314aba56f73","analyzedAt":"2026-08-13T19:07:19.849Z","schemaVersion":2},"datasetVersion":"2026-08-13T19:17:28.613Z"}