Merging //UE4/Dev-Main to Dev-Anim (//UE4/Dev-Anim) @ CL 5356908

#rb none

[CL 5360337 by Thomas Sarkanen in Dev-Anim branch]
This commit is contained in:
Thomas Sarkanen
2019-03-11 12:18:32 -04:00
parent 7f5c2a223f
commit bb193db1aa
536 changed files with 18114 additions and 9718 deletions

View File

@@ -52,6 +52,7 @@ void UGameplayDebuggerLocalController::Initialize(AGameplayDebuggerCategoryRepli
if (GIsEditor)
{
USelection::SelectionChangedEvent.AddUObject(this, &UGameplayDebuggerLocalController::OnSelectionChanged);
USelection::SelectObjectEvent.AddUObject(this, &UGameplayDebuggerLocalController::OnSelectedObject);
}
#endif
@@ -102,6 +103,7 @@ void UGameplayDebuggerLocalController::Cleanup()
{
#if WITH_EDITOR
USelection::SelectionChangedEvent.RemoveAll(this);
USelection::SelectObjectEvent.RemoveAll(this);
if (bSimulateMode)
{
@@ -653,7 +655,7 @@ void UGameplayDebuggerLocalController::OnSelectActorTick()
if (DebugActorCandidate != BestCandidate)
{
DebugActorCandidate = BestCandidate;
CachedReplicator->SetDebugActor(BestCandidate);
CachedReplicator->SetDebugActor(BestCandidate, true);
}
}
}
@@ -701,7 +703,21 @@ void UGameplayDebuggerLocalController::OnSelectionChanged(UObject* Object)
}
}
CachedReplicator->SetDebugActor(SelectedPawn);
if (SelectedPawn)
{
CachedReplicator->SetDebugActor(SelectedPawn, false);
CachedReplicator->CollectCategoryData(/*bForce=*/true);
}
}
}
void UGameplayDebuggerLocalController::OnSelectedObject(UObject* Object)
{
AController* SelectedController = Cast<AController>(Object);
APawn* SelectedPawn = SelectedController ? SelectedController->GetPawn() : Cast<APawn>(Object);
if (CachedReplicator && SelectedPawn && SelectedPawn->IsSelected())
{
CachedReplicator->SetDebugActor(SelectedPawn, false);
CachedReplicator->CollectCategoryData(/*bForce=*/true);
}
}