diff --git a/Plugins/CogAI/Source/CogAI/Private/CogAIWindow_BehaviorTree.cpp b/Plugins/CogAI/Source/CogAI/Private/CogAIWindow_BehaviorTree.cpp index 899692a..fe1bb31 100644 --- a/Plugins/CogAI/Source/CogAI/Private/CogAIWindow_BehaviorTree.cpp +++ b/Plugins/CogAI/Source/CogAI/Private/CogAIWindow_BehaviorTree.cpp @@ -4,6 +4,7 @@ #include "BehaviorTree/BehaviorTree.h" #include "BehaviorTree/BTCompositeNode.h" #include "BehaviorTree/BTNode.h" +#include "BehaviorTree/Tasks/BTTask_BlueprintBase.h" #include "BehaviorTree/Tasks/BTTask_Wait.h" #include "BrainComponent.h" #include "CogWindowWidgets.h" @@ -98,7 +99,17 @@ void UCogAIWindow_BehaviorTree::RenderContent() //-------------------------------------------------------------------------------------------------------------------------- void UCogAIWindow_BehaviorTree::RenderNode(UBehaviorTreeComponent* BehaviorTreeComponent, const UBTNode* Node, bool OpenAllChildren) { - const char* NodeName = TCHAR_TO_ANSI(*Node->GetNodeName()); + FString NodeNameStr; + if (const UBTTask_BlueprintBase* Wait = Cast(Node)) + { + NodeNameStr = Node->GetNodeName(); + } + else + { + NodeNameStr = Node->GetStaticDescription(); + } + + const char* NodeName = TCHAR_TO_ANSI(*NodeNameStr); const bool ShowNode = Filter.PassFilter(NodeName); const UBTCompositeNode* CompositeNode = Cast(Node); @@ -162,13 +173,7 @@ void UCogAIWindow_BehaviorTree::RenderNode(UBehaviorTreeComponent* BehaviorTreeC { ImGui::BeginTooltip(); ImGui::BeginDisabled(); - ImGui::Text(TCHAR_TO_ANSI(*Node->GetStaticDescription())); - - if (const UBTTask_Wait* Wait = Cast(Node)) - { - ImGui::Text("Wait: %0.2fs", Wait->WaitTime); - } - + ImGui::Text(NodeName); ImGui::EndDisabled(); ImGui::EndTooltip(); } diff --git a/Source/CogSample/CogSampleLogCategories.cpp b/Source/CogSample/CogSampleLogCategories.cpp index 10edb97..d145e47 100644 --- a/Source/CogSample/CogSampleLogCategories.cpp +++ b/Source/CogSample/CogSampleLogCategories.cpp @@ -39,7 +39,7 @@ namespace CogSampleLog FCogDebugLog::AddLogCategory(LogCogPossession, "Possession", "Log about the possession of player controller over a Character"); FCogDebugLog::AddLogCategory(LogCogRotation, "Rotation", "Debug Draw a Character Rotation"); FCogDebugLog::AddLogCategory(LogCogSkeleton, "Skeleton", "Debug Draw a Character Skeleton"); - FCogDebugLog::AddLogCategory(LogCogTargetAcquisition, "Target Acquisition", "Debug Draw a Character Collision"); + FCogDebugLog::AddLogCategory(LogCogTargetAcquisition, "Target Acquisition", "Debug Draw the target acquisition debug draw"); FCogDebugLog::AddLogCategory(LogGameplayEffects, "Gameplay Effects", "Unreal Gameplay Effect Log"); #endif //ENABLE_COG }