/// <summary> /// Removes an entity from the scene /// Based on its name /// </summary> /// <param name="entityName">Entity Name</param> public void RemoveEntity(string entityName) { IEntity entity = entityManager.GetEntity(entityName); entity.isActive = false; //If entity is collidable unsubscribe entity to collision events ICollisionListener listener = entity as ICollisionListener; if (listener != null) { collisionManager.UnregisterListener(listener); } sceneGraph.RemoveEntity(entity.UID); }