TransformParent

Hello :slight_smile:

Just wanted to ask if there is a way to destroy child objects in pure ECS or do I have to handle it on my own?

Example

var unit = em.CreateEntity(RTSBootstrap.UnitArchetype);
 
var turret = em.CreateEntity(RTSBootstrap.TurretArchetype);
em.SetComponentData(turretRing, new TransformParent {Value = unit});

em.DestroyEntity(unit) //Should delete unit and turret

Well there is no “children” construct in ECS like in vanilla Unity.

You have to handle it by your own.