Level Instances (Packed Level Instance Actor) Need Serious Work

Level Instance seem like a viable alternative to Prefab. However Level Instance usability leaves to be desired. I would like to be able to create a Packed Level Actor simply by right clicking on a level in the content browser. I shouldn’t have to right click in on an existing level instance in the outliner.

Furthermore, when creating a level instance actor from an a level instance, an additional level is created which I am hoping will be in sync with the corresponding BP that was created.

  1. First of all why can’t I just use the level instead of creating a new level asset to be used by the BP?
  2. Second of all, I have noticed that when adding shapes into the original level, I would like the BP to be automatically synced. I believe this was the intention however no changes are visible in the resulting packed level BP (EDIT: I have found that we have to keep it in sync manually :frowning: )

My last point is that is impossible to use Modelling tool like Cube Grid in connection with Level Instance blueprint because this feature is unavailable in the BP editor.

Because of all these issues, I am using the Prefabricator package as a workaround.

They’re not the most performant either.

I’ve got some benchmarks here that show that prefabs (using a singleton instance manager aka rdInst) perform much better:

Creating a Packed Level Actor from selected Level in the Content Browser is as easy as this. It’s unfortunate it’s not there by default. Seem like a reasonable workflow (much easier than dragging the level into the scene and creating from there).

    void CreatePackedLevelActor(TArray<FAssetData> SelectedAssets)
    {
        using namespace Courage;
        if (SelectedAssets.Num())
        {
            const FAssetData& AssetData = SelectedAssets[0];
            if (auto world = Cast<UWorld>(AssetData.GetAsset()))
            {
                FString name = world->GetName();
                name = name.Replace(L"Level_", L"PackedLevel_");
                UBlueprint* blueprint =  CreateBlueprintOnContentBrowser<APackedLevelActor>(name, true);
                //FPackedLevelActorUtils::CreateOrUpdateBlueprint(level->GetWorld(), blueprint);
                FPackedLevelActorBuilder::CreateDefaultBuilder()->CreateOrUpdateBlueprint(world, blueprint, true, true);
            }
        }
    }

One of my other gripe with PackedLevelActor is that all the InstancedStaticMesh components lose their name correspondence with their StaticMeshActor counterpart.

This makes it difficult to write construction script referring to the components. I believe the problem is due to how unlike actors, components do not have distinct names and label.

1 Like