{"record":{"id":"9c2e87db6f751364","repo":"stride3d/stride","slug":"failed-to-add-tile","errorCode":null,"errorMessage":"Failed to add tile","messagePattern":"Failed to add tile","errorType":"exception","errorClass":"InvalidOperationException","httpStatus":null,"severity":"error","filePath":"sources/engine/Stride.Navigation/Processors/NavigationProcessor.cs","lineNumber":232,"sourceCode":"            }\n\n            if (!data.LoadedGroups.TryGetValue(groupId, out var groupData))\n            {\n                if (!mesh.Layers.TryGetValue(groupId, out var layer))\n                    return null; // Group not present in navigation mesh\n\n                data.LoadedGroups.Add(groupId, groupData = new NavigationMeshGroupData\n                {\n                    Data = data,\n                    RecastNavigationMesh = new RecastNavigationMesh(mesh),\n                    Id = groupId,\n                });\n\n                // Add initial tiles to the navigation mesh\n                foreach (var tile in layer.Tiles)\n                {\n                    if (!groupData.RecastNavigationMesh.AddOrReplaceTile(tile.Value.Data))\n                        throw new InvalidOperationException(\"Failed to add tile\");\n                }\n            }\n\n            groupData.AddReference();\n            return groupData;\n        }\n\n        /// <summary>\n        /// Removes a reference to a group\n        /// </summary>\n        private void Unload(NavigationMeshGroupData group)\n        {\n            int referenceCount = group.Release();\n            if (referenceCount < 0)\n                throw new ArgumentOutOfRangeException();\n\n            if (referenceCount == 0)\n            {","sourceCodeStart":214,"sourceCodeEnd":250,"githubUrl":"https://github.com/stride3d/stride/blob/96fad776d210c221682aac1ccdf4c79dc046fc38/sources/engine/Stride.Navigation/Processors/NavigationProcessor.cs#L214-L250","documentation":"Thrown in NavigationProcessor.Load when RecastNavigationMesh.AddOrReplaceTile returns false while inserting the initial tiles of a loaded navigation mesh group, meaning Recast's tile cache rejected the tile data (e.g. incompatible tile build parameters or corrupt tile data).","triggerScenarios":"Loading a prebuilt navigation mesh asset whose tiles were baked with settings (cell size, tile size, agent parameters) inconsistent with the runtime navmesh instance, or corrupted/empty tile data.","commonSituations":"Version mismatches between editor-generated navmesh assets and the runtime build, changing NavMesh settings after baking, or asset corruption.","solutions":["Rebuild/rebake the navigation mesh asset with the current project settings","Verify navmesh build settings (tile size, cell size, agent config) were not changed after baking","Check tile data integrity; re-export or regenerate the group data"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try { navmesh.AddOrReplaceTile(tile.Data); }\ncatch (InvalidOperationException) { /* rebake navmesh asset or skip stale tile */ }","preventionTips":["Rebake navmesh assets after changing build settings","Keep editor and runtime versions in sync","Validate tile data after export/import"],"tags":["navigation","navmesh","tiles"],"backgroundTag":"invalid-state-transition","analyzedSha":"96fad776d210c221682aac1ccdf4c79dc046fc38","analyzedAt":"2026-09-14T02:59:31.279Z","contentChangedAt":"2026-09-14T02:59:31.279Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}