private void DestroyNotMappedWorldObjects() { foreach (var item in AllObjects.ToArray()) { if (!item.Value.Updated) { try { if (item.Value.Controller != null) { Destroy(item.Value.Controller); item.Value.Controller = null; } AllObjects.Remove(item.Key); } catch (Exception e) { WriteLog($"Error while DestroyNotMappedWorldObjects='{e}'"); } } } }