You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
Allow UPrimitiveComponent::LODParentPrimitive to be used outside of ALODActor
* Replaced CastCheckedby a null check in FHierarchicalLODUtilities::GetParentLODActor() #jira none #rb philippe.deseve #preflight skip [CL 25333655 by Sebastien Lussier in ue5-main branch]
This commit is contained in:
@@ -959,7 +959,6 @@ EClusterGenerationError FHierarchicalLODUtilities::ShouldGenerateCluster(AActor*
|
||||
|
||||
ALODActor* FHierarchicalLODUtilities::GetParentLODActor(const AActor* InActor)
|
||||
{
|
||||
ALODActor* ParentActor = nullptr;
|
||||
if (InActor)
|
||||
{
|
||||
TArray<UStaticMeshComponent*> ComponentArray;
|
||||
@@ -969,13 +968,15 @@ ALODActor* FHierarchicalLODUtilities::GetParentLODActor(const AActor* InActor)
|
||||
UPrimitiveComponent* ParentComponent = Component->GetLODParentPrimitive();
|
||||
if (ParentComponent)
|
||||
{
|
||||
ParentActor = CastChecked<ALODActor>(ParentComponent->GetOwner());
|
||||
break;
|
||||
if (ALODActor* ParentActor = Cast<ALODActor>(ParentComponent->GetOwner()))
|
||||
{
|
||||
return ParentActor;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return ParentActor;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void FHierarchicalLODUtilities::DestroyCluster(ALODActor* InActor)
|
||||
|
||||
Reference in New Issue
Block a user