Nez.Portable/ECS/Entity.cs
/// <summary>
/// detaches the Entity from the scene.
/// the following lifecycle method will be called on the Entity: onRemovedFromScene
/// the following lifecycle method will be called on the Components: onRemovedFromEntity
/// </summary>
detaches the Entity from the scene.
the following lifecycle method will be called on the Entity: onRemovedFromScene
the following lifecycle method will be called on the Components: onRemovedFromEntity
detaches the Entity from the scene . the following lifecycle method will be called on the Entity : onRemovedFromScene the following lifecycle method will be called on the Components : onRemovedFromEntity
public void detachFromScene()
        {
            scene.entities.remove(this);
            components.deregisterAllComponents();
            for (var i = 0; i < transform.childCount; i++)
                transform.getChild(i).entity.detachFromScene();
        }
public void detachFromScene ( ) { scene . entities . remove ( this ) ; components . deregisterAllComponents ( ) ; for ( var i = 0 ; i < transform . childCount ; i ++ ) transform . getChild ( i ) . entity . detachFromScene ( ) ; }
detaches the Entity from the scene.
detaches the Entity from the scene .