Skip to content

Commit 971ba9c

Browse files
committed
Fixed a compile issue on Mac
1 parent 99e1819 commit 971ba9c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Source/PrefabricatorRuntime/Private/Prefab/PrefabTools.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -566,7 +566,10 @@ void FPrefabTools::LoadStateFromPrefabAsset(APrefabActor* PrefabActor, const FPr
566566
// Set the transform
567567
FTransform WorldTransform = ActorItemData.RelativeTransform * PrefabActor->GetTransform();
568568
if (ChildActor->GetRootComponent()) {
569-
EComponentMobility::Type OldChildMobility = ChildActor->GetRootComponent() ? ChildActor->GetRootComponent()->Mobility : EComponentMobility::Movable;
569+
EComponentMobility::Type OldChildMobility = EComponentMobility::Movable;
570+
if (ChildActor->GetRootComponent()) {
571+
OldChildMobility = ChildActor->GetRootComponent()->Mobility;
572+
}
570573
ChildActor->GetRootComponent()->SetMobility(EComponentMobility::Movable);
571574
ChildActor->SetActorTransform(WorldTransform);
572575
ChildActor->GetRootComponent()->SetMobility(OldChildMobility);

0 commit comments

Comments
 (0)