{"record":{"id":"d54c5ce81a048502","repo":"stride3d/stride","slug":"could-not-find-child-entity-named-0","errorCode":null,"errorMessage":"Could not find child entity named {0}","messagePattern":"Could not find child entity named (.+?)","errorType":"exception","errorClass":"InvalidOperationException","httpStatus":null,"severity":"error","filePath":"sources/engine/Stride.Engine/Engine/Design/EntityChildPropertyResolver.cs","lineNumber":97,"sourceCode":"                throw new NotSupportedException();\n            }\n\n            /// <inheritdoc/>\n            public override object GetObject(IntPtr obj)\n            {\n                var entity = UpdateEngineHelper.PointerToObject<Entity>(obj);\n                foreach (var child in entity.Transform.Children)\n                {\n                    var childEntity = child.Entity;\n                    if (childEntity.Name == childName)\n                    {\n                        return childEntity;\n                    }\n                }\n\n                // TODO: Instead of throwing an exception, we could just skip it\n                // If we do that, we need to add how many entries to skip in the state machine\n                throw new InvalidOperationException(string.Format(\"Could not find child entity named {0}\", childName));\n            }\n\n            /// <inheritdoc/>\n            public override void SetObject(IntPtr obj, object data)\n            {\n                throw new NotSupportedException();\n            }\n        }\n\n        private class EntityComponentPropertyAccessor : UpdatableCustomAccessor\n        {\n            private readonly Type componentType;\n            private readonly TypeInfo componentTypeInfo;\n\n            public EntityComponentPropertyAccessor(Type componentType)\n            {\n                this.componentType = componentType;\n                componentTypeInfo = componentType.GetTypeInfo();","sourceCodeStart":79,"sourceCodeEnd":115,"githubUrl":"https://github.com/stride3d/stride/blob/96fad776d210c221682aac1ccdf4c79dc046fc38/sources/engine/Stride.Engine/Engine/Design/EntityChildPropertyResolver.cs#L79-L115","documentation":"EntityChildPropertyResolver's accessor GetObject walks the entity's child entities looking for one whose Name matches the configured childName. It throws InvalidOperationException when no child entity with that name exists, because the property path cannot be resolved. The code comments note Stride would rather skip it, but currently it fails hard.","triggerScenarios":"A property path references a child entity name that was renamed, deleted, or never created at resolution time (child spawned dynamically later).","commonSituations":"Renaming child entities in the editor after binding script property paths, deleting entities referenced by animation/automation paths, or children added at runtime while static paths expect them at load.","solutions":["Ensure a child entity with exactly that Name exists under the resolved entity (check trailing spaces and case).","Re-author the property path to the current child entity name after renames.","If children are dynamic, populate/resolve paths only after the children are added, or restructure to avoid static child-name paths."],"exampleFix":"// before\n// path: 'Enemy.Limb' but child was renamed to 'Enemy.Arm'\n// after\n// update the path in the property editor to 'Enemy.Arm' or rename the child entity back to 'Limb'","handlingStrategy":"validation","validationCode":"bool childExists = entity.Transform.Children\n    .Any(c => c.Entity.Name == childName);\nif (!childExists)\n    Log.Warning($\"Child entity '{childName}' missing; fix property path or entity name.\");","typeGuard":null,"tryCatchPattern":"try { resolver.Resolve(path); }\ncatch (InvalidOperationException) { Log.Error($\"Child entity '{childName}' not found for path '{path}'.\"); }","preventionTips":["Re-verify property paths after renaming or deleting child entities in the editor.","Avoid static child-name paths for dynamically spawned children.","Use exact-name matching checks (case, whitespace) before saving paths."],"tags":["scene-graph","entity","property-resolution"],"backgroundTag":"entity-not-found","analyzedSha":"96fad776d210c221682aac1ccdf4c79dc046fc38","analyzedAt":"2026-09-14T02:59:31.279Z","contentChangedAt":"2026-09-14T02:59:31.279Z","schemaVersion":2},"datasetVersion":"2026-09-15T23:17:13.987Z"}