diff --git a/Assets/Scripts/Game/Entity.cs b/Assets/Scripts/Game/Entity.cs index bc1aea9..fe9f4b9 100644 --- a/Assets/Scripts/Game/Entity.cs +++ b/Assets/Scripts/Game/Entity.cs @@ -65,8 +65,10 @@ public class Entity } meshRenderer.enabled = false; - // TODO: not sure if this is the right way to unlink world sub-models - gameObject.transform.DetachChildren(); + for (int child = 0; child < gameObject.transform.childCount; ++child) + { + Object.Destroy(gameObject.transform.GetChild(child).gameObject); + } } public void SetAliasModel(AliasModel model)