void FWorldTileModel::OnLevelLoadedFromDisk(ULevel* InLevel) { check(InLevel != NULL); UWorld* LevelWorld = CastChecked<UWorld>(InLevel->GetOuter()); UWorld* PersistentWorld = LevelCollectionModel.GetWorld(); UPackage* LevelPackage = CastChecked<UPackage>(InLevel->GetOutermost()); LoadedLevel = InLevel; // SaveLevel procedure relies on Levels list to be non empty! LevelWorld->AddLevel(LevelWorld->PersistentLevel); { ULevelStreaming* AssociatedStreaming = CreateAssosiatedStreamingLevel(); AssociatedStreaming->bShouldBeLoaded = true; AssociatedStreaming->bShouldBeVisible = false; } // Enable tile properties TileDetails->bTileEditable = true; //FixupStreamingObjects(); //EnsureLevelHasBoundsActor(); // This level might be added to world, it depends on current world origin position // In case level far enough from origin it will shelved auto& WorldModel = static_cast<FWorldTileCollectionModel&>(LevelCollectionModel); WorldModel.OnLevelLoadedFromDisk( StaticCastSharedRef<FWorldTileModel>(this->AsShared()) ); }