{"record":{"id":"c93194d114a55577","repo":"Unity-Technologies/UnityCsReference","slug":"could-not-find-the-requested-platform-texture-sett","errorCode":null,"errorMessage":"Could not find the requested Platform Texture Settings ('{name}'). This is incorrect, please report a bug.","messagePattern":"Could not find the requested Platform Texture Settings \\('(.+?)'\\)\\. This is incorrect, please report a bug\\.","errorType":"exception","errorClass":"UnityException","httpStatus":null,"severity":"error","filePath":"Editor/Mono/ImportSettings/TextureImportPlatformSettings.cs","lineNumber":621,"sourceCode":"            {\n                // Fetch the matching platform settings property.\n                // Do not skip element 0, the Default Platform is a valid choice.\n                for (int i = 0; i < platformSettingsArray.arraySize; ++i)\n                {\n                    SerializedProperty serializedProperty = platformSettingsArray.GetArrayElementAtIndex(i);\n                    if (serializedProperty.FindPropertyRelative(\"m_BuildTarget\").stringValue == model.platformTextureSettings.name)\n                    {\n                        model.platformTextureSettingsProp = serializedProperty;\n                        break;\n                    }\n                }\n\n                // Since we ensure that all known valid platforms are created in advance,\n                // we should be able to find the currently selected platform. If not, fail.\n                if (model.platformTextureSettingsProp is null)\n                {\n                    ResetSerializedProperties();\n                    throw new UnityException($\"Could not find the requested Platform Texture Settings ('{model.platformTextureSettings.name}'). This is incorrect, please report a bug.\");\n                }\n            }\n\n            model.alphaSplitProperty = model.platformTextureSettingsProp.FindPropertyRelative(\"m_AllowsAlphaSplitting\");\n            model.androidETC2FallbackOverrideProperty = model.platformTextureSettingsProp.FindPropertyRelative(\"m_AndroidETC2FallbackOverride\");\n            model.compressionQualityProperty = model.platformTextureSettingsProp.FindPropertyRelative(\"m_CompressionQuality\");\n            model.crunchedCompressionProperty = model.platformTextureSettingsProp.FindPropertyRelative(\"m_CrunchedCompression\");\n            model.maxTextureSizeProperty = model.platformTextureSettingsProp.FindPropertyRelative(\"m_MaxTextureSize\");\n            model.overriddenProperty = model.platformTextureSettingsProp.FindPropertyRelative(\"m_Overridden\");\n            model.resizeAlgorithmProperty = model.platformTextureSettingsProp.FindPropertyRelative(\"m_ResizeAlgorithm\");\n            model.textureCompressionProperty = model.platformTextureSettingsProp.FindPropertyRelative(\"m_TextureCompression\");\n            model.textureFormatProperty = model.platformTextureSettingsProp.FindPropertyRelative(\"m_TextureFormat\");\n        }\n\n        public override int GetTargetCount()\n        {\n            return m_Importers.Length;\n        }","sourceCodeStart":603,"sourceCodeEnd":639,"githubUrl":"https://github.com/Unity-Technologies/UnityCsReference/blob/225b0fbdb57cc17d094e8056b71f8314aba56f73/Editor/Mono/ImportSettings/TextureImportPlatformSettings.cs#L603-L639","documentation":"After confirming the platform settings array is non-empty, the loop searches for an element whose m_BuildTarget matches the currently selected platform's name. If none matches, it throws UnityException because the contract guarantees every valid platform is pre-created; a missing entry means the selected platform is unknown or the array is inconsistent.","triggerScenarios":"The platformTextureSettings.name (selected platform) has no matching m_BuildTarget string among the array elements — e.g. the selected platform was never added, the name string differs (case/format), or the array contains a stale/renamed set of platforms.","commonSituations":"A new BuildTarget added to the editor but not seeded into an existing texture asset's settings. Renamed platform display strings after upgrade. A custom platform whose name doesn't match what the texture importer registered. Editing import settings right after a platform list refresh.","solutions":["Reimport the texture so the importer seeds an entry for the selected platform.","Confirm the platform name string used by the inspector matches the m_BuildTarget value exactly (the comparison is ordinal, case-sensitive).","Switch to a different platform and back in the inspector to force re-resolution.","Delete and regenerate the .meta file if the platform list is permanently out of sync."],"exampleFix":"// before: selected platform absent from m_PlatformSettings -> UnityException\n\n// after\nAssetDatabase.ImportAsset(texturePath, ImportAssetOptions.ForceUpdate);","handlingStrategy":"try-catch","validationCode":"// confirm the selected platform exists in the array before syncing\nbool found = false;\nfor (int i = 0; i < platformSettingsArray.arraySize; i++)\n    if (platformSettingsArray.GetArrayElementAtIndex(i).FindPropertyRelative(\"m_BuildTarget\").stringValue == model.platformTextureSettings.name)\n        found = true;\nif (!found) AssetDatabase.ImportAsset(model.assetPath, ImportAssetOptions.ForceUpdate);","typeGuard":null,"tryCatchPattern":"try { model.UpdateSerializedPropertyData(); }\ncatch (UnityException) { AssetDatabase.ImportAsset(model.assetPath, ImportAssetOptions.ForceUpdate); }","preventionTips":["Switch platform and switch back to force re-seeding of a missing platform entry.","Keep platform name strings consistent (the comparison is ordinal, case-sensitive).","Reimport or regenerate .meta if the platform list drifts after an upgrade."],"tags":["texture-importer","platform-settings","inspector","build-target","serialization"],"backgroundTag":null,"analyzedSha":"225b0fbdb57cc17d094e8056b71f8314aba56f73","analyzedAt":"2026-08-13T19:07:19.849Z","schemaVersion":2},"datasetVersion":"2026-08-13T19:17:28.613Z"}