The question is, is it possible (and if so how) to generate an asset label, or otherwise assign assets to a specific package chunk using a cell transformer?
For context, we have a large world partitioned level with a specific section roped off to be played in during a streaming install. The problem is Fast Geo isn’t checking for null assets when it’s adding cells to the world that includes content that isn’t installed yet.
I’d like to devise a method to generate the list of missing assets rather than running around and figuring out what’s missing.
Assuming I am able to identify all the cells that would be loaded in this initial play area, would it be possible to set the chunk assignment or generate an asset label that assigns the chunk?
The cell transformers are not really a good place to create asset labels. They operate on the generated cells which do not exists outside of PIE or cook time at the editor level. I suppose that you could manually create a Primary Asset Label asset and add the generated level to the Explicit Assets array when cooking. I’m still unsure if this would be picked up by the rest of the pipeline.
Have you considered putting the startup part of the world in a separate WP level and including that level as a Sub WP (through a LevelInstance Actor) in the main level? That way, you could push the startup level to a chunk part of the initial install. The dependencies from the startup level should be part of the same chunk. It could end up duplicated if they are referenced by multiple chunks. In this case, you will want to force assign the data to a higher priority chunk.
Can you provide more details on the issue you are seeing with FastGeo? The UFastGeoContainer::Assets array should contain a reference to all required assets and those refs should pull the packages in the chunk of the level unless the assets are assigned to a higher priority chunks.
The engine makes the assumption that the content is present when running cooked data. You are lucky that only FastGeo doesn’t behave well in this case. Licensees that have carved out a startup package when using WP are usually making sure that the “rim” of the playable area is part of it so dependencies are satisfied.
We do have those areas as separate sub levels and composed using level instances. And use asset labels to mark those levels and referenced assets. But the problem arises when standing near the border of the streaming install play area where cells outside the area are trying be loaded.
What we’re seeing with Fast Geo is that a cell will attempt to be loaded regardless of the install state. When the cell loads referencing meshes or materials that are not installed they appear as null pointers. And the references made by Fast Geo are not generally checked for nulls when being processed.
Most recently we’ve run into this with UFastGeoContainer::CacheMaterialAssets(), if materials are in an uninstalled chunk the list will contain null pointers. When this list is later iterated, such as in FFastGeoMaterialPostLoadInit::Initialize, the lambda function passed to ForEachMaterialAsset do not check for nulls causing a crash.
Our workaround for now is to manually check and remove nulls in the CacheMaterialAssets call. And then figure out what’s missing after the fact. I have a cell transformer that logs the contents of every cell and then uses that data to compare against the chunk manifest of a package build.