Add target acquisition in the sample

This commit is contained in:
Arnaud Jamin
2023-10-06 02:27:00 -04:00
parent 25f2e06400
commit 92396410d4
36 changed files with 1657 additions and 97 deletions
@@ -5,7 +5,7 @@
#include "CogDebugHelper.h"
#include "CogDebugDrawImGui.h"
#include "CogImguiHelper.h"
#include "CogDebugLogCategoryManager.h"
#include "CogDebugLog.h"
#include "CogDebugModule.h"
#include "CogDebugReplicator.h"
#include "Engine/SkeletalMesh.h"
@@ -16,7 +16,7 @@
//--------------------------------------------------------------------------------------------------------------------------
void FCogDebugDraw::String2D(const FLogCategoryBase& LogCategory, const UObject* WorldContextObject, const FString& Text, const FVector2D& Location, const FColor& Color, bool Persistent)
{
if (FCogDebugLogCategoryManager::IsLogCategoryActive(LogCategory))
if (FCogDebugLog::IsLogCategoryActive(LogCategory))
{
FCogDebugDrawImGui::AddText(
FCogImguiHelper::ToImVec2(Location),
@@ -31,7 +31,7 @@ void FCogDebugDraw::String2D(const FLogCategoryBase& LogCategory, const UObject*
//--------------------------------------------------------------------------------------------------------------------------
void FCogDebugDraw::Segment2D(const FLogCategoryBase& LogCategory, const UObject* WorldContextObject, const FVector2D& SegmentStart, const FVector2D& SegmentEnd, const FColor& Color, bool Persistent)
{
if (FCogDebugLogCategoryManager::IsLogCategoryActive(LogCategory))
if (FCogDebugLog::IsLogCategoryActive(LogCategory))
{
FCogDebugDrawImGui::AddLine(
FCogImguiHelper::ToImVec2(SegmentStart),
@@ -46,7 +46,7 @@ void FCogDebugDraw::Segment2D(const FLogCategoryBase& LogCategory, const UObject
//--------------------------------------------------------------------------------------------------------------------------
void FCogDebugDraw::Circle2D(const FLogCategoryBase& LogCategory, const UObject* WorldContextObject, const FVector2D& Location, float Radius, const FColor& Color, bool Persistent)
{
if (FCogDebugLogCategoryManager::IsLogCategoryActive(LogCategory))
if (FCogDebugLog::IsLogCategoryActive(LogCategory))
{
FCogDebugDrawImGui::AddCircle(
FCogImguiHelper::ToImVec2(Location),
@@ -63,7 +63,7 @@ void FCogDebugDraw::Circle2D(const FLogCategoryBase& LogCategory, const UObject*
void FCogDebugDraw::Rect2D(const FLogCategoryBase& LogCategory, const UObject* WorldContextObject, const FVector2D& Min, const FVector2D& Max, const FColor& Color, bool Persistent)
{
if (FCogDebugLogCategoryManager::IsLogCategoryActive(LogCategory))
if (FCogDebugLog::IsLogCategoryActive(LogCategory))
{
const ImVec2 ImMin = FCogImguiHelper::ToImVec2(Min);
const ImVec2 ImMax = FCogImguiHelper::ToImVec2(Max);
@@ -82,7 +82,7 @@ void FCogDebugDraw::Rect2D(const FLogCategoryBase& LogCategory, const UObject* W
//--------------------------------------------------------------------------------------------------------------------------
void FCogDebugDraw::String(const FLogCategoryBase& LogCategory, const UObject* WorldContextObject, const FString& Text, const FVector& Location, const FColor& Color, const bool Persistent)
{
if (FCogDebugLogCategoryManager::IsLogCategoryActive(LogCategory))
if (FCogDebugLog::IsLogCategoryActive(LogCategory))
{
const FColor NewColor = FCogDebugSettings::ModulateDebugColor(WorldContextObject->GetWorld(), Color, Persistent);
UE_VLOG_LOCATION(WorldContextObject, LogCategory, Verbose, Location, 10.0f, NewColor, TEXT("%s"), *Text);
@@ -102,7 +102,7 @@ void FCogDebugDraw::String(const FLogCategoryBase& LogCategory, const UObject* W
//--------------------------------------------------------------------------------------------------------------------------
void FCogDebugDraw::Point(const FLogCategoryBase& LogCategory, const UObject* WorldContextObject, const FVector& Location, const float Size, const FColor& Color, const bool Persistent, const uint8 DepthPriority)
{
if (FCogDebugLogCategoryManager::IsLogCategoryActive(LogCategory))
if (FCogDebugLog::IsLogCategoryActive(LogCategory))
{
const FColor NewColor = FCogDebugSettings::ModulateDebugColor(WorldContextObject->GetWorld(), Color, Persistent);
::DrawDebugPoint(
@@ -121,7 +121,7 @@ void FCogDebugDraw::Point(const FLogCategoryBase& LogCategory, const UObject* Wo
//--------------------------------------------------------------------------------------------------------------------------
void FCogDebugDraw::Segment(const FLogCategoryBase& LogCategory, const UObject* WorldContextObject, const FVector& SegmentStart, const FVector& SegmentEnd, const FColor& Color, const bool Persistent, const uint8 DepthPriority)
{
if (FCogDebugLogCategoryManager::IsLogCategoryActive(LogCategory))
if (FCogDebugLog::IsLogCategoryActive(LogCategory))
{
const FColor NewColor = FCogDebugSettings::ModulateDebugColor(WorldContextObject->GetWorld(), Color, Persistent);
UE_VLOG_SEGMENT(WorldContextObject, LogCategory, Verbose, SegmentStart, SegmentEnd, NewColor, TEXT_EMPTY);
@@ -142,7 +142,7 @@ void FCogDebugDraw::Segment(const FLogCategoryBase& LogCategory, const UObject*
//--------------------------------------------------------------------------------------------------------------------------
void FCogDebugDraw::Bone(const FLogCategoryBase& LogCategory, const UObject* WorldContextObject, const FVector& BoneLocation, const FVector& ParentLocation, const FColor& Color, const bool Persistent, const uint8 DepthPriority)
{
if (FCogDebugLogCategoryManager::IsLogCategoryActive(LogCategory))
if (FCogDebugLog::IsLogCategoryActive(LogCategory))
{
const FColor NewColor = FCogDebugSettings::ModulateDebugColor(WorldContextObject->GetWorld(), Color, Persistent);
UE_VLOG_SEGMENT(WorldContextObject, LogCategory, Verbose, BoneLocation, ParentLocation, NewColor, TEXT_EMPTY);
@@ -173,7 +173,7 @@ void FCogDebugDraw::Bone(const FLogCategoryBase& LogCategory, const UObject* Wor
//--------------------------------------------------------------------------------------------------------------------------
void FCogDebugDraw::Arrow(const FLogCategoryBase& LogCategory, const UObject* WorldContextObject, const FVector& SegmentStart, const FVector& SegmentEnd, const FColor& Color, const bool Persistent, const uint8 DepthPriority)
{
if (FCogDebugLogCategoryManager::IsLogCategoryActive(LogCategory))
if (FCogDebugLog::IsLogCategoryActive(LogCategory))
{
const FColor NewColor = FCogDebugSettings::ModulateDebugColor(WorldContextObject->GetWorld(), Color, Persistent);
UE_VLOG_ARROW(WorldContextObject, LogCategory, Verbose, SegmentStart, SegmentEnd, NewColor, TEXT_EMPTY);
@@ -195,7 +195,7 @@ void FCogDebugDraw::Arrow(const FLogCategoryBase& LogCategory, const UObject* Wo
//--------------------------------------------------------------------------------------------------------------------------
void FCogDebugDraw::Axis(const FLogCategoryBase& LogCategory, const UObject* WorldContextObject, const FVector& AxisLoc, const FRotator& AxisRot, float Scale, const bool Persistent, const uint8 DepthPriority)
{
if (FCogDebugLogCategoryManager::IsLogCategoryActive(LogCategory))
if (FCogDebugLog::IsLogCategoryActive(LogCategory))
{
FRotationMatrix R(AxisRot);
UE_VLOG_ARROW(WorldContextObject, LogCategory, Verbose, AxisLoc, AxisLoc + R.GetScaledAxis(EAxis::X) * Scale, FColor::Red, TEXT_EMPTY);
@@ -218,7 +218,7 @@ void FCogDebugDraw::Axis(const FLogCategoryBase& LogCategory, const UObject* Wor
//--------------------------------------------------------------------------------------------------------------------------
void FCogDebugDraw::Circle(const FLogCategoryBase& LogCategory, const UObject* WorldContextObject, const FMatrix& Matrix, float Radius, const FColor& Color, const bool Persistent, const uint8 DepthPriority)
{
if (FCogDebugLogCategoryManager::IsLogCategoryActive(LogCategory))
if (FCogDebugLog::IsLogCategoryActive(LogCategory))
{
const FColor NewColor = FCogDebugSettings::ModulateDebugColor(WorldContextObject->GetWorld(), Color, Persistent);
const FVector Center = Matrix.GetOrigin();
@@ -243,7 +243,7 @@ void FCogDebugDraw::Circle(const FLogCategoryBase& LogCategory, const UObject* W
//--------------------------------------------------------------------------------------------------------------------------
void FCogDebugDraw::CircleArc(const FLogCategoryBase& LogCategory, const UObject* WorldContextObject, const FMatrix& Matrix, float InnerRadius, float OuterRadius, float Angle, const FColor& Color, const bool Persistent, const uint8 DepthPriority)
{
if (FCogDebugLogCategoryManager::IsLogCategoryActive(LogCategory))
if (FCogDebugLog::IsLogCategoryActive(LogCategory))
{
const FColor NewColor = FCogDebugSettings::ModulateDebugColor(WorldContextObject->GetWorld(), Color, Persistent);
@@ -269,7 +269,7 @@ void FCogDebugDraw::CircleArc(const FLogCategoryBase& LogCategory, const UObject
//--------------------------------------------------------------------------------------------------------------------------
void FCogDebugDraw::FlatCapsule(const FLogCategoryBase& LogCategory, const UObject* WorldContextObject, const FVector2D& Start, const FVector2D& End, const float Radius, const float Z, const FColor& Color, const bool Persistent, const uint8 DepthPriority)
{
if (FCogDebugLogCategoryManager::IsLogCategoryActive(LogCategory))
if (FCogDebugLog::IsLogCategoryActive(LogCategory))
{
const FColor NewColor = FCogDebugSettings::ModulateDebugColor(WorldContextObject->GetWorld(), Color, Persistent);
// TODO : Add VLOG
@@ -294,7 +294,7 @@ void FCogDebugDraw::FlatCapsule(const FLogCategoryBase& LogCategory, const UObje
//--------------------------------------------------------------------------------------------------------------------------
void FCogDebugDraw::Sphere(const FLogCategoryBase& LogCategory, const UObject* WorldContextObject, const FVector& Location, float Radius, const FColor& Color, const bool Persistent, const uint8 DepthPriority)
{
if (FCogDebugLogCategoryManager::IsLogCategoryActive(LogCategory))
if (FCogDebugLog::IsLogCategoryActive(LogCategory))
{
const FColor NewColor = FCogDebugSettings::ModulateDebugColor(WorldContextObject->GetWorld(), Color, Persistent);
UE_VLOG_CAPSULE(WorldContextObject, LogCategory, Verbose, Location, 0.0f, Radius, FQuat::Identity, NewColor, TEXT_EMPTY);
@@ -316,7 +316,7 @@ void FCogDebugDraw::Sphere(const FLogCategoryBase& LogCategory, const UObject* W
//--------------------------------------------------------------------------------------------------------------------------
void FCogDebugDraw::Box(const FLogCategoryBase& LogCategory, const UObject* WorldContextObject, const FVector& Center, const FVector& Extent, const FQuat& Rotation, const FColor& Color, const bool Persistent, const uint8 DepthPriority)
{
if (FCogDebugLogCategoryManager::IsLogCategoryActive(LogCategory))
if (FCogDebugLog::IsLogCategoryActive(LogCategory))
{
const FColor NewColor = FCogDebugSettings::ModulateDebugColor(WorldContextObject->GetWorld(), Color, Persistent);
UE_VLOG_OBOX(WorldContextObject, LogCategory, Verbose, FBox(-Extent, Extent), FQuatRotationTranslationMatrix::Make(Rotation, Center), NewColor, TEXT_EMPTY);
@@ -339,7 +339,7 @@ void FCogDebugDraw::Box(const FLogCategoryBase& LogCategory, const UObject* Worl
//--------------------------------------------------------------------------------------------------------------------------
void FCogDebugDraw::SolidBox(const FLogCategoryBase& LogCategory, const UObject* WorldContextObject, const FVector& Center, const FVector& Extent, const FQuat& Rotation, const FColor& Color, const bool Persistent, const uint8 DepthPriority)
{
if (FCogDebugLogCategoryManager::IsLogCategoryActive(LogCategory))
if (FCogDebugLog::IsLogCategoryActive(LogCategory))
{
const FColor NewColor = FCogDebugSettings::ModulateDebugColor(WorldContextObject->GetWorld(), Color, Persistent);
UE_VLOG_OBOX(WorldContextObject, LogCategory, Verbose, FBox(-Extent, Extent), FQuatRotationTranslationMatrix::Make(Rotation, Center), NewColor, TEXT_EMPTY);
@@ -366,7 +366,7 @@ void FCogDebugDraw::SolidBox(const FLogCategoryBase& LogCategory, const UObject*
//--------------------------------------------------------------------------------------------------------------------------
void FCogDebugDraw::Frustrum(const FLogCategoryBase& LogCategory, const UObject* WorldContextObject, const FMatrix& Matrix, const float Angle, const float AspectRatio, const float NearPlane, const float FarPlane, const FColor& Color, const bool Persistent, const uint8 DepthPriority)
{
if (FCogDebugLogCategoryManager::IsLogCategoryActive(LogCategory))
if (FCogDebugLog::IsLogCategoryActive(LogCategory))
{
const FColor NewColor = FCogDebugSettings::ModulateDebugColor(WorldContextObject->GetWorld(), Color, Persistent);
@@ -390,7 +390,7 @@ void FCogDebugDraw::Frustrum(const FLogCategoryBase& LogCategory, const UObject*
//--------------------------------------------------------------------------------------------------------------------------
void FCogDebugDraw::Capsule(const FLogCategoryBase& LogCategory, const UObject* WorldContextObject, const FVector& Center, const float HalfHeight, const float Radius, const FQuat& Rotation, const FColor& Color, const bool Persistent, const uint8 DepthPriority)
{
if (FCogDebugLogCategoryManager::IsLogCategoryActive(LogCategory))
if (FCogDebugLog::IsLogCategoryActive(LogCategory))
{
const FColor NewColor = FCogDebugSettings::ModulateDebugColor(WorldContextObject->GetWorld(), Color, Persistent);
UE_VLOG_CAPSULE(WorldContextObject, LogCategory, Verbose, Center, HalfHeight, Radius, FQuat::Identity, NewColor, TEXT_EMPTY);
@@ -414,7 +414,7 @@ void FCogDebugDraw::Capsule(const FLogCategoryBase& LogCategory, const UObject*
//--------------------------------------------------------------------------------------------------------------------------
void FCogDebugDraw::Points(const FLogCategoryBase& LogCategory, const UObject* WorldContextObject, const TArray<FVector>& Points, float Radius, const FColor& StartColor, const FColor& EndColor, const bool Persistent, const uint8 DepthPriority)
{
if (FCogDebugLogCategoryManager::IsLogCategoryActive(LogCategory))
if (FCogDebugLog::IsLogCategoryActive(LogCategory))
{
int32 index = 0;
for (const FVector& Point : Points)
@@ -429,7 +429,7 @@ void FCogDebugDraw::Points(const FLogCategoryBase& LogCategory, const UObject* W
//--------------------------------------------------------------------------------------------------------------------------
void FCogDebugDraw::Path(const FLogCategoryBase& LogCategory, const UObject* WorldContextObject, const TArray<FVector>& Points, float PointSize, const FColor& StartColor, const FColor& EndColor, const bool Persistent, const uint8 DepthPriority)
{
if (FCogDebugLogCategoryManager::IsLogCategoryActive(LogCategory))
if (FCogDebugLog::IsLogCategoryActive(LogCategory))
{
if (Points.Num() == 0)
{
@@ -465,7 +465,7 @@ void FCogDebugDraw::Skeleton(const FLogCategoryBase& LogCategory, const USkeleta
return;
}
if (FCogDebugLogCategoryManager::IsLogCategoryActive(LogCategory))
if (FCogDebugLog::IsLogCategoryActive(LogCategory))
{
const FReferenceSkeleton& ReferenceSkeleton = Skeleton->GetSkeletalMeshAsset()->GetRefSkeleton();
const FTransform WorldTransform = Skeleton->GetComponentTransform();
@@ -1,4 +1,4 @@
#include "CogDebugLogCategoryManager.h"
#include "CogDebugLog.h"
#include "CogDebugModule.h"
#include "CogDebugReplicator.h"
@@ -10,7 +10,7 @@
DEFINE_LOG_CATEGORY(LogCogNone);
DEFINE_LOG_CATEGORY(LogCogServerDebug);
TMap<FName, FCogDebugLogCategoryInfo> FCogDebugLogCategoryManager::LogCategories;
TMap<FName, FCogDebugLogCategoryInfo> FCogDebugLog::LogCategories;
//--------------------------------------------------------------------------------------------------------------------------
@@ -34,7 +34,7 @@ FString FCogDebugLogCategoryInfo::GetDisplayName() const
//--------------------------------------------------------------------------------------------------------------------------
// FCogDebugLogCategoryManager
//--------------------------------------------------------------------------------------------------------------------------
void FCogDebugLogCategoryManager::AddLogCategory(FLogCategoryBase& LogCategory, const FString& DisplayName, bool bVisible)
void FCogDebugLog::AddLogCategory(FLogCategoryBase& LogCategory, const FString& DisplayName, bool bVisible)
{
LogCategories.Add(LogCategory.GetCategoryName(),
FCogDebugLogCategoryInfo
@@ -47,19 +47,19 @@ void FCogDebugLogCategoryManager::AddLogCategory(FLogCategoryBase& LogCategory,
}
//--------------------------------------------------------------------------------------------------------------------------
bool FCogDebugLogCategoryManager::IsVerbosityActive(ELogVerbosity::Type Verbosity)
bool FCogDebugLog::IsVerbosityActive(ELogVerbosity::Type Verbosity)
{
return Verbosity >= ELogVerbosity::Verbose;
}
//--------------------------------------------------------------------------------------------------------------------------
bool FCogDebugLogCategoryManager::IsLogCategoryActive(const FLogCategoryBase& LogCategory)
bool FCogDebugLog::IsLogCategoryActive(const FLogCategoryBase& LogCategory)
{
return IsVerbosityActive(LogCategory.GetVerbosity());
}
//--------------------------------------------------------------------------------------------------------------------------
bool FCogDebugLogCategoryManager::IsLogCategoryActive(FName CategoryName)
bool FCogDebugLog::IsLogCategoryActive(FName CategoryName)
{
if (FLogCategoryBase* LogCategory = FindLogCategory(CategoryName))
{
@@ -70,13 +70,13 @@ bool FCogDebugLogCategoryManager::IsLogCategoryActive(FName CategoryName)
}
//--------------------------------------------------------------------------------------------------------------------------
void FCogDebugLogCategoryManager::SetLogCategoryActive(FLogCategoryBase& LogCategory, bool Value)
void FCogDebugLog::SetLogCategoryActive(FLogCategoryBase& LogCategory, bool Value)
{
LogCategory.SetVerbosity(Value ? ELogVerbosity::Verbose : ELogVerbosity::Warning);
}
//--------------------------------------------------------------------------------------------------------------------------
void FCogDebugLogCategoryManager::OnServerVerbosityChanged(FName CategoryName, ELogVerbosity::Type Verbosity)
void FCogDebugLog::OnServerVerbosityChanged(FName CategoryName, ELogVerbosity::Type Verbosity)
{
if (FCogDebugLogCategoryInfo* LogCategoryInfo = FindLogCategoryInfo(CategoryName))
{
@@ -85,7 +85,7 @@ void FCogDebugLogCategoryManager::OnServerVerbosityChanged(FName CategoryName, E
}
//--------------------------------------------------------------------------------------------------------------------------
ELogVerbosity::Type FCogDebugLogCategoryManager::GetServerVerbosity(FName CategoryName)
ELogVerbosity::Type FCogDebugLog::GetServerVerbosity(FName CategoryName)
{
if (FCogDebugLogCategoryInfo* LogCategoryInfo = FindLogCategoryInfo(CategoryName))
{
@@ -96,7 +96,7 @@ ELogVerbosity::Type FCogDebugLogCategoryManager::GetServerVerbosity(FName Catego
}
//--------------------------------------------------------------------------------------------------------------------------
void FCogDebugLogCategoryManager::SetServerVerbosity(UWorld& World, FName CategoryName, ELogVerbosity::Type Verbosity)
void FCogDebugLog::SetServerVerbosity(UWorld& World, FName CategoryName, ELogVerbosity::Type Verbosity)
{
if (ACogDebugReplicator* Replicator = FCogDebugModule::Get().GetLocalReplicator(World))
{
@@ -105,25 +105,25 @@ void FCogDebugLogCategoryManager::SetServerVerbosity(UWorld& World, FName Catego
}
//--------------------------------------------------------------------------------------------------------------------------
void FCogDebugLogCategoryManager::SetServerVerbosityActive(UWorld& World, FName CategoryName, bool Value)
void FCogDebugLog::SetServerVerbosityActive(UWorld& World, FName CategoryName, bool Value)
{
SetServerVerbosity(World, CategoryName, Value ? ELogVerbosity::Verbose : ELogVerbosity::Warning);
}
//--------------------------------------------------------------------------------------------------------------------------
bool FCogDebugLogCategoryManager::IsServerVerbosityActive(FName CategoryName)
bool FCogDebugLog::IsServerVerbosityActive(FName CategoryName)
{
return IsVerbosityActive(GetServerVerbosity(CategoryName));
}
//--------------------------------------------------------------------------------------------------------------------------
FCogDebugLogCategoryInfo* FCogDebugLogCategoryManager::FindLogCategoryInfo(FName CategoryName)
FCogDebugLogCategoryInfo* FCogDebugLog::FindLogCategoryInfo(FName CategoryName)
{
return LogCategories.Find(CategoryName);
}
//--------------------------------------------------------------------------------------------------------------------------
FLogCategoryBase* FCogDebugLogCategoryManager::FindLogCategory(FName CategoryName)
FLogCategoryBase* FCogDebugLog::FindLogCategory(FName CategoryName)
{
if (FCogDebugLogCategoryInfo* LogCategoryInfo = FindLogCategoryInfo(CategoryName))
{
@@ -138,7 +138,7 @@ FLogCategoryBase* FCogDebugLogCategoryManager::FindLogCategory(FName CategoryNam
}
//--------------------------------------------------------------------------------------------------------------------------
void FCogDebugLogCategoryManager::DeactivateAllLogCateories(UWorld& World)
void FCogDebugLog::DeactivateAllLogCateories(UWorld& World)
{
FString ToggleStr = TEXT("Log LogCogNone Only");
GEngine->Exec(&World, *ToggleStr);
@@ -1,6 +1,6 @@
#include "CogDebugLogBlueprint.h"
#include "CogDebugLogCategoryManager.h"
#include "CogDebugLog.h"
#include "CogDebugLogMacros.h"
//--------------------------------------------------------------------------------------------------------------------------
@@ -35,7 +35,7 @@ bool UCogDebugLogBlueprint::IsLogActive(const UObject* WorldContextObject, FCogL
if (const FLogCategoryBase* LogCategoryPtr = LogCategory.GetLogCategory())
{
if (FCogDebugLogCategoryManager::IsLogCategoryActive(*LogCategoryPtr) == false)
if (FCogDebugLog::IsLogCategoryActive(*LogCategoryPtr) == false)
{
return false;
}
@@ -1,6 +1,6 @@
#include "CogDebugLogCategory.h"
#include "CogDebugLogCategoryManager.h"
#include "CogDebugLog.h"
//--------------------------------------------------------------------------------------------------------------------------
FLogCategoryBase* FCogLogCategory::GetLogCategory() const
@@ -18,7 +18,7 @@ FLogCategoryBase* FCogLogCategory::GetLogCategory() const
if (LogCategory == nullptr)
{
if (FCogDebugLogCategoryInfo* CategoryInfo = FCogDebugLogCategoryManager::GetLogCategories().Find(Name))
if (FCogDebugLogCategoryInfo* CategoryInfo = FCogDebugLog::GetLogCategories().Find(Name))
{
LogCategory = CategoryInfo->LogCategory;
}
@@ -181,7 +181,7 @@ void ACogDebugReplicator::Server_SetCategoryVerbosity_Implementation(FName LogCa
ENetMode NetMode = GetWorld()->GetNetMode();
if (NetMode == NM_DedicatedServer || NetMode == NM_ListenServer)
{
if (FCogDebugLogCategoryInfo* LogCategoryInfo = FCogDebugLogCategoryManager::FindLogCategoryInfo(LogCategoryName))
if (FCogDebugLogCategoryInfo* LogCategoryInfo = FCogDebugLog::FindLogCategoryInfo(LogCategoryName))
{
LogCategoryInfo->LogCategory->SetVerbosity((ELogVerbosity::Type)Verbosity);
@@ -203,7 +203,7 @@ void ACogDebugReplicator::NetMulticast_SendCategoriesVerbosity_Implementation(co
{
for (const FCogServerCategoryData& Category : Categories)
{
FCogDebugLogCategoryManager::OnServerVerbosityChanged(Category.LogCategoryName, (ELogVerbosity::Type)Category.Verbosity);
FCogDebugLog::OnServerVerbosityChanged(Category.LogCategoryName, (ELogVerbosity::Type)Category.Verbosity);
}
}
@@ -219,7 +219,7 @@ void ACogDebugReplicator::Client_SendCategoriesVerbosity_Implementation(const TA
{
for (const FCogServerCategoryData& Category : Categories)
{
FCogDebugLogCategoryManager::OnServerVerbosityChanged(Category.LogCategoryName, (ELogVerbosity::Type)Category.Verbosity);
FCogDebugLog::OnServerVerbosityChanged(Category.LogCategoryName, (ELogVerbosity::Type)Category.Verbosity);
}
}
@@ -235,7 +235,7 @@ void ACogDebugReplicator::Server_RequestAllCategoriesVerbosity_Implementation()
if (NetMode == NM_DedicatedServer || NetMode == NM_ListenServer)
{
TArray<FCogServerCategoryData> CategoriesData;
for (auto& Entry : FCogDebugLogCategoryManager::GetLogCategories())
for (auto& Entry : FCogDebugLog::GetLogCategories())
{
FCogDebugLogCategoryInfo& CategoryInfo = Entry.Value;
if (CategoryInfo.LogCategory != nullptr)
@@ -3,7 +3,7 @@
#include "CoreMinimal.h"
#include "imgui.h"
class FCogDebugDrawImGui
class COGDEBUG_API FCogDebugDrawImGui
{
public:
static void AddLine(const ImVec2& P1, const ImVec2& P2, ImU32 Color, float Thickness = 1.0f, float Duration = 0.0f, bool FadeColor = false);
@@ -20,7 +20,7 @@ struct COGDEBUG_API FCogDebugLogCategoryInfo
};
//--------------------------------------------------------------------------------------------------------------------------
struct COGDEBUG_API FCogDebugLogCategoryManager
struct COGDEBUG_API FCogDebugLog
{
static void AddLogCategory(FLogCategoryBase& LogCategory, const FString& DisplayName = "", bool bVisible = true);