Agged GameplayTasks information to GameplayDebugger #UE4

[CL 2605455 by Mieszko Zielinski in Main branch]
This commit is contained in:
Mieszko Zielinski
2015-06-30 07:11:55 -04:00
committed by mieszko.zielinski@epicgames.com
parent ffdd157997
commit fb69a2c1c3
5 changed files with 58 additions and 29 deletions

View File

@@ -85,6 +85,9 @@ class GAMEPLAYDEBUGGER_API UGameplayDebuggingComponent : public UPrimitiveCompon
UPROPERTY(Replicated)
FString CurrentAIAssets;
UPROPERTY(Replicated)
FString GameplayTasksState;
UPROPERTY(Replicated)
FString NavDataInfo;

View File

@@ -214,6 +214,8 @@ void UGameplayDebuggingComponent::GetLifetimeReplicatedProps( TArray< FLifetimeP
DOREPLIFETIME(UGameplayDebuggingComponent, CurrentAIState);
DOREPLIFETIME(UGameplayDebuggingComponent, CurrentAIAssets);
DOREPLIFETIME(UGameplayDebuggingComponent, GameplayTasksState);
DOREPLIFETIME(UGameplayDebuggingComponent, bIsUsingAbilities);
DOREPLIFETIME(UGameplayDebuggingComponent, AbilityInfo);
@@ -531,6 +533,16 @@ void UGameplayDebuggingComponent::CollectBasicBehaviorData(APawn* MyPawn)
CurrentAIState = TEXT("");
CurrentAIAssets = TEXT("");
}
UGameplayTasksComponent* GTComponent = MyPawn->FindComponentByClass<UGameplayTasksComponent>();
if (GTComponent)
{
GameplayTasksState = FString::Printf(TEXT("Ticking Tasks: %s\nTask Queue: %s"), *GTComponent->GetTickingTasksDescription(), *GTComponent->GetTasksPriorityQueueDescription());
}
else
{
GameplayTasksState = TEXT("");
}
#endif //!(UE_BUILD_SHIPPING || UE_BUILD_TEST)
}

View File

@@ -395,7 +395,7 @@ void AGameplayDebuggingHUDComponent::DrawBasicData(APlayerController* PC, class
PrintString(DefaultContext, FString::Printf(TEXT("Behavior: {yellow}%s{white}, Tree: {yellow}%s\n"), *DebugComponent->CurrentAIState, *DebugComponent->CurrentAIAssets));
PrintString(DefaultContext, FString::Printf(TEXT("Active task: {yellow}%s\n"), *DebugComponent->CurrentAITask));
}
// ability + animation
if (DebugComponent->bIsUsingAbilities && DebugComponent->bIsUsingCharacter)
{
@@ -410,6 +410,9 @@ void AGameplayDebuggingHUDComponent::DrawBasicData(APlayerController* PC, class
PrintString(DefaultContext, FString::Printf(TEXT("Ability: {yellow}%s\n"), *DebugComponent->AbilityInfo));
}
// putting gameplay tasks' stuff last since it can expand heavily
PrintString(DefaultContext, FString::Printf(TEXT("GameplayTasks:\n{yellow}%s\n"), *DebugComponent->GameplayTasksState));
DrawPath(PC, DebugComponent);
#endif //!(UE_BUILD_SHIPPING || UE_BUILD_TEST)
}