You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
Agged GameplayTasks information to GameplayDebugger #UE4
[CL 2605455 by Mieszko Zielinski in Main branch]
This commit is contained in:
committed by
mieszko.zielinski@epicgames.com
parent
ffdd157997
commit
fb69a2c1c3
@@ -85,6 +85,9 @@ class GAMEPLAYDEBUGGER_API UGameplayDebuggingComponent : public UPrimitiveCompon
|
||||
UPROPERTY(Replicated)
|
||||
FString CurrentAIAssets;
|
||||
|
||||
UPROPERTY(Replicated)
|
||||
FString GameplayTasksState;
|
||||
|
||||
UPROPERTY(Replicated)
|
||||
FString NavDataInfo;
|
||||
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user