Hi all
I’m working on converting my project to UE5.5 and have a specific level that is failing to add its Actors to it when opened.
The specific failing check is below:
void ULevel::AddLoadedActors(const TArray<AActor*>& ActorList, const FTransform* TransformToApply)
{
// Actors set used to accelerate lookups for actors already in the level's actor list. This can happen for newly added
// actors, as spawning them will add them to the actors array, and grabbing an actor descriptor reference on them will trigger
// loading, even if the actor already exists.
TSet<AActor*> ActorsSet(ObjectPtrDecay(Actors));
// Actors queue that will be added to the level, filtered for actors already in the level's actor list.
TArray<AActor*> ActorsQueue;
ActorsQueue.Reserve(ActorList.Num());
TFunction<void(AActor* Actor)> QueueActor = [this, &ActorsSet, &ActorsQueue, &QueueActor](AActor* Actor)
{
check(IsValidChecked(Actor));
check(Actor->GetLevel() == this);
When this check fails, its because GetLevel is null. Stepping through GetLevel I found that these actors do have valid Outer objects, but none are cast-able to a Level.
These objects are seemingly all Niagara related (NiagaraNodeFunctionCall) is an example.
Is it possible there was a change to these assets (or a wider change as part of 5.5) that would cause these assets not to deserialize correctly? Perhaps these assets need resaved?