diff --git a/Plugins/Cog/Source/CogCommon/Public/CogCommon.h b/Plugins/Cog/Source/CogCommon/Public/CogCommon.h index 496c529..6b32441 100644 --- a/Plugins/Cog/Source/CogCommon/Public/CogCommon.h +++ b/Plugins/Cog/Source/CogCommon/Public/CogCommon.h @@ -82,10 +82,13 @@ #else //ENABLE_COG -#define IF_COG(expr) (0) -#define COG_LOG_CATEGORY FNoLoggingCategory -#define COG_LOG_ABILITY(...) (0) - +#define IF_COG(expr) (0) +#define COG_LOG_CATEGORY FNoLoggingCategory +#define COG_LOG_ABILITY(...) (0) +#define COG_NOTIFY(Format, ...) (0) +#define COG_NOTIFY_WARNING(Format, ...) (0) +#define COG_NOTIFY_ERROR(Format, ...) (0) +#define COG_NOTIFY_VERBOSITY(Verbosity, Format, ...) (0) #define COG_LOG_ACTIVE_FOR_OBJECT(Object) (0) #define COG_LOG(LogCategory, Verbosity, Format, ...) (0) #define COG_LOG_FUNC(LogCategory, Verbosity, Format, ...) (0) diff --git a/Plugins/Cog/Source/CogEngine/Private/CogEngineWindow_Notifications.cpp b/Plugins/Cog/Source/CogEngine/Private/CogEngineWindow_Notifications.cpp index b5ec15f..f6c26c8 100644 --- a/Plugins/Cog/Source/CogEngine/Private/CogEngineWindow_Notifications.cpp +++ b/Plugins/Cog/Source/CogEngine/Private/CogEngineWindow_Notifications.cpp @@ -53,7 +53,8 @@ void FCogEngineWindow_Notifications::OnLogReceived(const TCHAR* InMessage, ELogV { return; } static FName CmdName("Cmd"); - + +#if ENABLE_COG if (InCategory == LogCogNotify.GetCategoryName() || (InCategory == CmdName && Config->NotifyConsoleCommands) || (InVerbosity == ELogVerbosity::Warning && Config->NotifyAllWarnings) @@ -61,8 +62,10 @@ void FCogEngineWindow_Notifications::OnLogReceived(const TCHAR* InMessage, ELogV { AddNotification(InMessage, InVerbosity); } +#endif } + //-------------------------------------------------------------------------------------------------------------------------- void FCogEngineWindow_Notifications::RenderTick(float DeltaTime) { diff --git a/Plugins/Cog/Source/CogEngine/Private/CogEngineWindow_OutputLog.cpp b/Plugins/Cog/Source/CogEngine/Private/CogEngineWindow_OutputLog.cpp index a2c6071..ecb6a73 100644 --- a/Plugins/Cog/Source/CogEngine/Private/CogEngineWindow_OutputLog.cpp +++ b/Plugins/Cog/Source/CogEngine/Private/CogEngineWindow_OutputLog.cpp @@ -34,7 +34,6 @@ void FCogEngineWindow_OutputLog::Clear() { TextBuffer.clear(); LogInfos.Empty(); - Notifications.Empty(); } //-------------------------------------------------------------------------------------------------------------------------- @@ -59,11 +58,6 @@ void FCogEngineWindow_OutputLog::AddLog(const TCHAR* InMessage, ELogVerbosity::T TextBuffer.append(Format.GetData(), Format.GetData() + Format.Len()); LogInfo.LineEnd = TextBuffer.size(); - - if (LogInfo.Category == LogCogNotify.GetCategoryName()) - { - Notifications.Emplace(LogInfo); - } } //-------------------------------------------------------------------------------------------------------------------------- diff --git a/Plugins/Cog/Source/CogEngine/Public/CogEngineWindow_OutputLog.h b/Plugins/Cog/Source/CogEngine/Public/CogEngineWindow_OutputLog.h index 454a619..cb13085 100644 --- a/Plugins/Cog/Source/CogEngine/Public/CogEngineWindow_OutputLog.h +++ b/Plugins/Cog/Source/CogEngine/Public/CogEngineWindow_OutputLog.h @@ -67,8 +67,6 @@ protected: FCogLogOutputDevice OutputDevice; TWeakObjectPtr Config; - - TArray Notifications; }; //-------------------------------------------------------------------------------------------------------------------------- diff --git a/Source/CogSample/CogSample.Build.cs b/Source/CogSample/CogSample.Build.cs index 9118ff5..f2ecb5d 100644 --- a/Source/CogSample/CogSample.Build.cs +++ b/Source/CogSample/CogSample.Build.cs @@ -22,7 +22,7 @@ public class CogSample : ModuleRules "Niagara", }); - if (Target.Configuration != UnrealTargetConfiguration.Shipping && Target.Type != TargetRules.TargetType.Server) + if (Target.Configuration != UnrealTargetConfiguration.Shipping) { PublicDependencyModuleNames.AddRange(new string[] {