stride3d/stride · error · InvalidOperationException
Could not find child entity named
Error message
Could not find child entity named {0} What it means
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.
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.
Example fix
// before // path: 'Enemy.Limb' but child was renamed to 'Enemy.Arm' // after // update the path in the property editor to 'Enemy.Arm' or rename the child entity back to 'Limb'
Defensive patterns
Strategy: validation
Validate before calling
bool childExists = entity.Transform.Children
.Any(c => c.Entity.Name == childName);
if (!childExists)
Log.Warning($"Child entity '{childName}' missing; fix property path or entity name."); Try / catch
try { resolver.Resolve(path); }
catch (InvalidOperationException) { Log.Error($"Child entity '{childName}' not found for path '{path}'."); } Prevention
- 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.
When it happens
Trigger: A property path references a child entity name that was renamed, deleted, or never created at resolution time (child spawned dynamically later).
Common situations: 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.
Understand the failure class
Background: "Not found" and "does not exist" errors: why "Task not found", "No such folder", and "Can't find" fire when a lookup comes back empty — this error's family across 14 libraries.
Related errors
- This entity is another entity's child. Detach it before…
- is not contained in a hierarchy.
- Property Key path parse error: could not parse indexer value
- can only handle Value and Object keys
- This entity already has a scene. Detach it first.
AI-assisted analysis of stride3d/stride@96fad776d2 (2026-09-14).
Data as JSON: /api/errors/d54c5ce81a048502.
Report an issue: GitHub.
Appendix: source
Thrown at sources/engine/Stride.Engine/Engine/Design/EntityChildPropertyResolver.cs:97
throw new NotSupportedException();
}
/// <inheritdoc/>
public override object GetObject(IntPtr obj)
{
var entity = UpdateEngineHelper.PointerToObject<Entity>(obj);
foreach (var child in entity.Transform.Children)
{
var childEntity = child.Entity;
if (childEntity.Name == childName)
{
return childEntity;
}
}
// TODO: Instead of throwing an exception, we could just skip it
// If we do that, we need to add how many entries to skip in the state machine
throw new InvalidOperationException(string.Format("Could not find child entity named {0}", childName));
}
/// <inheritdoc/>
public override void SetObject(IntPtr obj, object data)
{
throw new NotSupportedException();
}
}
private class EntityComponentPropertyAccessor : UpdatableCustomAccessor
{
private readonly Type componentType;
private readonly TypeInfo componentTypeInfo;
public EntityComponentPropertyAccessor(Type componentType)
{
this.componentType = componentType;
componentTypeInfo = componentType.GetTypeInfo();View on GitHub (pinned to 96fad776d2)