You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
Fixed static analysis
#jira UE-151771 #rb patrick.enfedaque #preflight 627e48205d0fe3ffef3c57ac #rnx [CL 20180106 by Richard Malo in ue5-main branch]
This commit is contained in:
@@ -82,12 +82,14 @@ private:
|
||||
{
|
||||
FActorTreeItem::UpdateDisplayString();
|
||||
|
||||
UWorld* OwningWorld = Actor.IsValid() ? Actor->GetWorld() : nullptr;
|
||||
ULevel* Level = Actor.IsValid() ? Actor->GetLevel() : nullptr;
|
||||
ULevelInstanceSubsystem* LevelInstanceSubsystem = UWorld::GetSubsystem<ULevelInstanceSubsystem>(OwningWorld);
|
||||
if (LevelInstanceSubsystem && Level && (Level != OwningWorld->GetCurrentLevel()))
|
||||
if (UWorld* OwningWorld = Actor.IsValid() ? Actor->GetWorld() : nullptr)
|
||||
{
|
||||
DisplayString = LevelInstanceSubsystem->PrefixWithParentLevelInstanceActorLabels(DisplayString, Actor->GetLevel());
|
||||
ULevel* Level = Actor.IsValid() ? Actor->GetLevel() : nullptr;
|
||||
ULevelInstanceSubsystem* LevelInstanceSubsystem = UWorld::GetSubsystem<ULevelInstanceSubsystem>(OwningWorld);
|
||||
if (LevelInstanceSubsystem && Level && (Level != OwningWorld->GetCurrentLevel()))
|
||||
{
|
||||
DisplayString = LevelInstanceSubsystem->PrefixWithParentLevelInstanceActorLabels(DisplayString, Actor->GetLevel());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -275,25 +275,26 @@ void FSceneOutlinerModule::CreateActorInfoColumns(FSceneOutlinerInitializationOp
|
||||
{
|
||||
if (const FWorldPartitionActorDesc* ActorDesc = ActorDescItem->ActorDescHandle.Get(); ActorDesc && !ActorDesc->GetDataLayerInstanceNames().IsEmpty())
|
||||
{
|
||||
const UActorDescContainer* ActorDescContainer = ActorDescItem->ActorDescHandle.Container.Get();
|
||||
const UWorld* World = ActorDescContainer ? ActorDescContainer->GetWorld() : nullptr;
|
||||
|
||||
if (const UDataLayerSubsystem* DataLayerSubsystem = UWorld::GetSubsystem<UDataLayerSubsystem>(World))
|
||||
if (const UActorDescContainer* ActorDescContainer = ActorDescItem->ActorDescHandle.Container.Get())
|
||||
{
|
||||
TSet<const UDataLayerInstance*> DataLayerInstances;
|
||||
DataLayerInstances.Append(DataLayerSubsystem->GetDataLayerInstances(ActorDesc->GetDataLayerInstanceNames()));
|
||||
if (ULevelInstanceSubsystem* LevelInstanceSubsystem = UWorld::GetSubsystem<ULevelInstanceSubsystem>(World))
|
||||
const UWorld* World = ActorDescContainer->GetWorld();
|
||||
if (const UDataLayerSubsystem* DataLayerSubsystem = UWorld::GetSubsystem<UDataLayerSubsystem>(World))
|
||||
{
|
||||
UWorld* OuterWorld = ActorDescContainer->GetTypedOuter<UWorld>();
|
||||
// Add parent container Data Layer Instances
|
||||
AActor* CurrentActor = OuterWorld ? Cast<AActor>(LevelInstanceSubsystem->GetOwningLevelInstance(OuterWorld->PersistentLevel)) : nullptr;
|
||||
while (CurrentActor)
|
||||
TSet<const UDataLayerInstance*> DataLayerInstances;
|
||||
DataLayerInstances.Append(DataLayerSubsystem->GetDataLayerInstances(ActorDesc->GetDataLayerInstanceNames()));
|
||||
if (ULevelInstanceSubsystem* LevelInstanceSubsystem = UWorld::GetSubsystem<ULevelInstanceSubsystem>(World))
|
||||
{
|
||||
DataLayerInstances.Append(bUseLevelContext ? CurrentActor->GetDataLayerInstancesForLevel() : CurrentActor->GetDataLayerInstances());
|
||||
CurrentActor = Cast<AActor>(LevelInstanceSubsystem->GetParentLevelInstance(CurrentActor));
|
||||
};
|
||||
UWorld* OuterWorld = ActorDescContainer->GetTypedOuter<UWorld>();
|
||||
// Add parent container Data Layer Instances
|
||||
AActor* CurrentActor = OuterWorld ? Cast<AActor>(LevelInstanceSubsystem->GetOwningLevelInstance(OuterWorld->PersistentLevel)) : nullptr;
|
||||
while (CurrentActor)
|
||||
{
|
||||
DataLayerInstances.Append(bUseLevelContext ? CurrentActor->GetDataLayerInstancesForLevel() : CurrentActor->GetDataLayerInstances());
|
||||
CurrentActor = Cast<AActor>(LevelInstanceSubsystem->GetParentLevelInstance(CurrentActor));
|
||||
};
|
||||
}
|
||||
BuildDataLayers(DataLayerInstances, bUseLevelContext);
|
||||
}
|
||||
BuildDataLayers(DataLayerInstances, bUseLevelContext);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user