public void RemoveActor(UnrealActor actor) { if (isReadOnly) { throw new InvalidOperationException("This map cannot be modified because it is read-only"); } else { if (actor is UnrealBrush) { brushes.Remove(actor as UnrealBrush); } actors.Remove(actor); actor.RemoveOwner(this); } }