Hello,
We’ve observed some confusing behavior in the Streaming Generation logs related to RuntimeGrid assignments.
Specifically, we’re using an ActorDescMutator to override the RuntimerGrid for certain actors late in the content pipeline. However, when inspecting the Streaming Generation logs, the overwritten values from the mutator do not seem to be reflected, the logs appear to show the original, unmodified RuntimeGrid instead.
This raises a concern:
Are our actors actually being assigned to the correct grid (NewGrid) at runtime, or is the Mutator not being applied as expected?
Could you please confirm:
- Whether the Streaming Generation logs display the final, effective values (i.e. including ActorDescMutator overrides)?
- If not, is there a way to verify that the overridden RuntimeGrid is in fact being used?
Thanks in advance for your help!
Best regards,
Philippe
void UMyStreamingGenerationMutator::Initialize(FSubsystemCollectionBase& Collection)
{
if (const UWorld* World = GetWorld(); World && World->GetWorldPartition())
{
World->GetWorldPartition()->OnGenerateStreamingActorDescsMutatePhase.AddUObject(this, &UAvaStreamingGenerationMutator::HandleStreamingGenerationMutatorPhase);
}
}
void UMyStreamingGenerationMutator::HandleStreamingGenerationMutatorPhase(const IStreamingGenerationContext* Context, TArray<FActorDescViewMutatorInstance>& OutMutatorInstances) const
{
Context->ForEachActorSetContainerInstance([&](const IStreamingGenerationContext::FActorSetContainerInstance& Container)
{
Container.ActorDescViewMap->ForEachActorDescView([&](const FStreamingGenerationActorDescView& ActorDescView)
{
const FWorldPartitionActorDescInstance* ActorDescInstance = ActorDescView.GetActorDescInstance();
if (!ActorDescInstance)
{
return;
}
//Some logic to filter ActorDescs
// ...
const FName TargetGridName = FName(RuleAsset->TargetRuntimeGrid);
const FName CurrentGridName = ActorDescInstance->GetRuntimeGrid();
if (CurrentGridName != TargetGridName)
{
FActorDescViewMutatorInstance MutatorInstance;
MutatorInstance.ActorGuid = ActorDescInstance->GetGuid();
MutatorInstance.RuntimeGrid = TargetGridName;
OutMutatorInstances.Add(MutatorInstance);
}
});
});
}