Updates for compilation in 5.4 as an engine plugin

This commit is contained in:
2024-04-09 15:28:56 -04:00
parent 16f2f36400
commit 1bf26e3ecb
13 changed files with 76 additions and 81 deletions
@@ -11,7 +11,7 @@ struct COGCOMMON_API FCogLogCategory
FCogLogCategory() {}
UPROPERTY(EditAnywhere, BlueprintReadWrite)
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Cog")
FName Name;
FString GetName() const { return Name.ToString(); }
@@ -81,8 +81,6 @@ bool FCogDebug::IsDebugActiveForObject_Internal(const UObject* WorldContextObjec
Outer = NewOuter;
}
return true;
}
//--------------------------------------------------------------------------------------------------------------------------
@@ -5,6 +5,7 @@
#include "Engine/Engine.h"
#include "DrawDebugHelpers.h"
#include "Components/BoxComponent.h"
#include "Engine/OverlapResult.h"
namespace
{
@@ -131,11 +131,6 @@ FLogCategoryBase* FCogDebugLog::FindLogCategory(const FName CategoryName)
{
return LogCategoryInfo->LogCategory;
}
else
{
return nullptr;
}
return nullptr;
}
@@ -12,55 +12,55 @@ class COGDEBUG_API UCogDebugDrawBlueprint : public UBlueprintFunctionLibrary
public:
UFUNCTION(BlueprintCallable, meta = (DevelopmentOnly, WorldContext = "WorldContextObject"))
UFUNCTION(BlueprintCallable, meta = (DevelopmentOnly, WorldContext = "WorldContextObject"), Category="Cog")
static void DebugDrawString(const UObject* WorldContextObject, FCogLogCategory LogCategory, const FString& Text, const FVector Location, const FLinearColor Color, bool Persistent);
UFUNCTION(BlueprintCallable, meta = (DevelopmentOnly, WorldContext = "WorldContextObject"))
UFUNCTION(BlueprintCallable, meta = (DevelopmentOnly, WorldContext = "WorldContextObject"), Category="Cog")
static void DebugDrawPoint(const UObject* WorldContextObject, FCogLogCategory LogCategory, const FVector Location, float size, const FLinearColor Color, bool Persistent, uint8 DepthPriority);
UFUNCTION(BlueprintCallable, meta = (DevelopmentOnly, WorldContext = "WorldContextObject"))
UFUNCTION(BlueprintCallable, meta = (DevelopmentOnly, WorldContext = "WorldContextObject"), Category="Cog")
static void DebugDrawSegment(const UObject* WorldContextObject, FCogLogCategory LogCategory, const FVector SegmentStart, const FVector SegmentEnd, const FLinearColor Color, bool Persistent, uint8 DepthPriority);
UFUNCTION(BlueprintCallable, meta = (DevelopmentOnly, WorldContext = "WorldContextObject"))
UFUNCTION(BlueprintCallable, meta = (DevelopmentOnly, WorldContext = "WorldContextObject"), Category="Cog")
static void DebugDrawArrow(const UObject* WorldContextObject, FCogLogCategory LogCategory, const FVector SegmentStart, const FVector SegmentEnd, const FLinearColor Color, bool Persistent, uint8 DepthPriority);
UFUNCTION(BlueprintCallable, meta = (DevelopmentOnly, WorldContext = "WorldContextObject"))
UFUNCTION(BlueprintCallable, meta = (DevelopmentOnly, WorldContext = "WorldContextObject"), Category="Cog")
static void DebugDrawAxis(const UObject* WorldContextObject, FCogLogCategory LogCategory, const FVector Location, const FRotator Rotation, float Scale, bool Persistent, uint8 DepthPriority);
UFUNCTION(BlueprintCallable, meta = (DevelopmentOnly, WorldContext = "WorldContextObject"))
UFUNCTION(BlueprintCallable, meta = (DevelopmentOnly, WorldContext = "WorldContextObject"), Category="Cog")
static void DebugDrawSphere(const UObject* WorldContextObject, FCogLogCategory LogCategory, const FVector Location, float Radius, const FLinearColor Color, bool Persistent, uint8 DepthPriority);
UFUNCTION(BlueprintCallable, meta = (DevelopmentOnly, WorldContext = "WorldContextObject"))
UFUNCTION(BlueprintCallable, meta = (DevelopmentOnly, WorldContext = "WorldContextObject"), Category="Cog")
static void DebugDrawBox(const UObject* WorldContextObject, FCogLogCategory LogCategory, const FVector Center, const FVector Extent, const FQuat Rotation, const FLinearColor Color, bool Persistent, uint8 DepthPriority);
UFUNCTION(BlueprintCallable, meta = (DevelopmentOnly, WorldContext = "WorldContextObject"))
UFUNCTION(BlueprintCallable, meta = (DevelopmentOnly, WorldContext = "WorldContextObject"), Category="Cog")
static void DebugDrawSolidBox(const UObject* WorldContextObject, FCogLogCategory LogCategory, const FVector Center, const FVector Extent, const FQuat Rotation, const FLinearColor Color, bool Persistent, uint8 DepthPriority);
UFUNCTION(BlueprintCallable, meta = (DevelopmentOnly, WorldContext = "WorldContextObject"))
UFUNCTION(BlueprintCallable, meta = (DevelopmentOnly, WorldContext = "WorldContextObject"), Category="Cog")
static void DebugDrawCapsule(const UObject* WorldContextObject, FCogLogCategory LogCategory, const FVector Center, const float HalfHeight, const float Radius, const FQuat Rotation, const FLinearColor Color, bool Persistent, uint8 DepthPriority);
UFUNCTION(BlueprintCallable, meta = (DevelopmentOnly, WorldContext = "WorldContextObject"))
UFUNCTION(BlueprintCallable, meta = (DevelopmentOnly, WorldContext = "WorldContextObject"), Category="Cog")
static void DebugDrawCircle(const UObject* WorldContextObject, FCogLogCategory LogCategory, const FMatrix& Matrix, float Radius, const FLinearColor Color, bool Persistent, uint8 DepthPriority);
UFUNCTION(BlueprintCallable, meta = (DevelopmentOnly, WorldContext = "WorldContextObject"))
UFUNCTION(BlueprintCallable, meta = (DevelopmentOnly, WorldContext = "WorldContextObject"), Category="Cog")
static void DebugDrawCircleArc(const UObject* WorldContextObject, FCogLogCategory LogCategory, const FMatrix& Matrix, float InnerRadius, float OuterRadius, float Angle, const FLinearColor Color, bool Persistent, uint8 DepthPriority);
UFUNCTION(BlueprintCallable, meta = (DevelopmentOnly, WorldContext = "WorldContextObject"))
UFUNCTION(BlueprintCallable, meta = (DevelopmentOnly, WorldContext = "WorldContextObject"), Category="Cog")
static void DebugDrawPoints(const UObject* WorldContextObject, FCogLogCategory LogCategory, const TArray<FVector>& Points, float Radius, const FLinearColor StartColor, const FLinearColor EndColor, bool Persistent, uint8 DepthPriority);
UFUNCTION(BlueprintCallable, meta = (DevelopmentOnly, WorldContext = "WorldContextObject"))
UFUNCTION(BlueprintCallable, meta = (DevelopmentOnly, WorldContext = "WorldContextObject"), Category="Cog")
static void DebugDrawPath(const UObject* WorldContextObject, FCogLogCategory LogCategory, const TArray<FVector>& Points, float PointSize, const FLinearColor StartColor, const FLinearColor EndColor, bool Persistent, uint8 DepthPriority);
UFUNCTION(BlueprintCallable, meta = (DevelopmentOnly, WorldContext = "WorldContextObject"))
UFUNCTION(BlueprintCallable, meta = (DevelopmentOnly, WorldContext = "WorldContextObject"), Category="Cog")
static void DebugDrawString2D(const UObject* WorldContextObject, FCogLogCategory LogCategory, const FString& Text, const FVector2D Location, const FLinearColor Color, bool Persistent);
UFUNCTION(BlueprintCallable, meta = (DevelopmentOnly, WorldContext = "WorldContextObject"))
UFUNCTION(BlueprintCallable, meta = (DevelopmentOnly, WorldContext = "WorldContextObject"), Category="Cog")
static void DebugDrawSegment2D(const UObject* WorldContextObject, FCogLogCategory LogCategory, const FVector2D SegmentStart, const FVector2D SegmentEnd, const FLinearColor Color, bool Persistent);
UFUNCTION(BlueprintCallable, meta = (DevelopmentOnly, WorldContext = "WorldContextObject"))
UFUNCTION(BlueprintCallable, meta = (DevelopmentOnly, WorldContext = "WorldContextObject"), Category="Cog")
static void DebugDrawCircle2D(const UObject* WorldContextObject, FCogLogCategory LogCategory, const FVector2D Location, float Radius, const FLinearColor Color, bool Persistent);
UFUNCTION(BlueprintCallable, meta = (DevelopmentOnly, WorldContext = "WorldContextObject"))
UFUNCTION(BlueprintCallable, meta = (DevelopmentOnly, WorldContext = "WorldContextObject"), Category="Cog")
static void DebugDrawRect2D(const UObject* WorldContextObject, FCogLogCategory LogCategory, const FVector2D Min, const FVector2D Max, const FLinearColor Color, bool Persistent);
};
@@ -26,10 +26,10 @@ class COGDEBUG_API UCogDebugLogBlueprint : public UBlueprintFunctionLibrary
public:
UFUNCTION(BlueprintCallable, meta = (DevelopmentOnly, WorldContext = "WorldContextObject"))
UFUNCTION(BlueprintCallable, meta = (DevelopmentOnly, WorldContext = "WorldContextObject"), Category="Cog")
static void Log(const UObject* WorldContextObject, FCogLogCategory LogCategory, ECogLogVerbosity Verbosity = ECogLogVerbosity::Verbose, const FString& Text = FString(""));
UFUNCTION(BlueprintPure, meta = (DevelopmentOnly, WorldContext = "WorldContextObject"))
UFUNCTION(BlueprintPure, meta = (DevelopmentOnly, WorldContext = "WorldContextObject"), Category="Cog")
static bool IsLogActive(const UObject* WorldContextObject, const FCogLogCategory LogCategory);
};
@@ -11,6 +11,6 @@ class COGDEBUG_API UCogDebugPlotBlueprint : public UBlueprintFunctionLibrary
public:
UFUNCTION(BlueprintCallable, meta = (DevelopmentOnly))
UFUNCTION(BlueprintCallable, meta = (DevelopmentOnly), Category="Cog")
static void Plot(const UObject* Owner, const FName Name, const float Value);
};
@@ -5,6 +5,7 @@
#include "Components/PrimitiveComponent.h"
#include "Components/SceneComponent.h"
#include "Engine/World.h"
#include "Engine/OverlapResult.h"
//--------------------------------------------------------------------------------------------------------------------------
ACogEngineCollisionTester::ACogEngineCollisionTester(const FObjectInitializer& ObjectInitializer)
@@ -58,75 +58,75 @@ public:
void Query() const;
UPROPERTY(EditAnywhere)
UPROPERTY(EditAnywhere, Category="Cog")
bool TickInEditor = false;
UPROPERTY(EditAnywhere)
UPROPERTY(EditAnywhere, Category="Cog")
ECogEngine_CollisionQueryType Type = ECogEngine_CollisionQueryType::LineTrace;
UPROPERTY(EditAnywhere)
UPROPERTY(EditAnywhere, Category="Cog")
ECogEngine_CollisionQueryMode Mode = ECogEngine_CollisionQueryMode::Multi;
UPROPERTY(EditAnywhere)
UPROPERTY(EditAnywhere, Category="Cog")
ECogEngine_CollisionQueryBy By = ECogEngine_CollisionQueryBy::Channel;
UPROPERTY(EditAnywhere)
UPROPERTY(EditAnywhere, Category="Cog")
ECogEngine_CollisionQueryShape Shape = ECogEngine_CollisionQueryShape::Sphere;
UPROPERTY(EditAnywhere)
UPROPERTY(EditAnywhere, Category="Cog")
bool TraceComplex = false;
UPROPERTY()
int32 ObjectTypesToQuery = 0;
UPROPERTY(EditAnywhere)
UPROPERTY(EditAnywhere, Category="Cog")
TEnumAsByte<ECollisionChannel> Channel = ECC_WorldStatic;
UPROPERTY()
int32 ProfileIndex = 0;
UPROPERTY(EditAnywhere)
UPROPERTY(EditAnywhere, Category="Cog")
FVector ShapeExtent = FVector(100, 100, 100);
UPROPERTY(EditAnywhere)
UPROPERTY(EditAnywhere, Category="Cog")
bool DrawHitLocations = true;
UPROPERTY(EditAnywhere)
UPROPERTY(EditAnywhere, Category="Cog")
bool DrawHitImpactPoints = true;
UPROPERTY(EditAnywhere)
UPROPERTY(EditAnywhere, Category="Cog")
bool DrawHitShapes = true;
UPROPERTY(EditAnywhere)
UPROPERTY(EditAnywhere, Category="Cog")
bool DrawHitNormals = true;
UPROPERTY(EditAnywhere)
UPROPERTY(EditAnywhere, Category="Cog")
bool DrawHitImpactNormals = true;
UPROPERTY(EditAnywhere)
UPROPERTY(EditAnywhere, Category="Cog")
bool DrawHitPrimitives = true;
UPROPERTY(EditAnywhere)
UPROPERTY(EditAnywhere, Category="Cog")
bool DrawHitActorsNames = false;
UPROPERTY(EditAnywhere)
UPROPERTY(EditAnywhere, Category="Cog")
float HitPointSize = 5.0f;
UPROPERTY(EditAnywhere)
UPROPERTY(EditAnywhere, Category="Cog")
FColor NoHitColor = FColor::Red;
UPROPERTY(EditAnywhere)
UPROPERTY(EditAnywhere, Category="Cog")
FColor HitColor = FColor::Green;
UPROPERTY(EditAnywhere)
UPROPERTY(EditAnywhere, Category="Cog")
FColor NormalColor = FColor::Yellow;
UPROPERTY(EditAnywhere)
UPROPERTY(EditAnywhere, Category="Cog")
FColor ImpactNormalColor = FColor::Cyan;
UPROPERTY(EditAnywhere)
UPROPERTY(EditAnywhere, Category="Cog")
USceneComponent* StartComponent = nullptr;
UPROPERTY(EditAnywhere)
UPROPERTY(EditAnywhere, Category="Cog")
USceneComponent* EndComponent = nullptr;
};
@@ -11,10 +11,10 @@ struct COGENGINE_API FCogEngineSpawnEntry
{
GENERATED_BODY()
UPROPERTY(EditAnywhere)
UPROPERTY(EditAnywhere, Category="Cog")
TSubclassOf<AActor> Class;
UPROPERTY(EditAnywhere)
UPROPERTY(EditAnywhere, Category="Cog")
TObjectPtr<const UObject> Asset = nullptr;
};
@@ -24,13 +24,13 @@ struct COGENGINE_API FCogEngineSpawnGroup
{
GENERATED_BODY()
UPROPERTY(EditAnywhere)
UPROPERTY(EditAnywhere, Category="Cog")
FString Name;
UPROPERTY(EditAnywhere)
UPROPERTY(EditAnywhere, Category="Cog")
FLinearColor Color = FLinearColor(0.5f, 0.5f, 0.5f, 1.0f);
UPROPERTY(EditAnywhere)
UPROPERTY(EditAnywhere, Category="Cog")
TArray<FCogEngineSpawnEntry> Spawns;
};
@@ -163,7 +163,7 @@ void UCogWindowManager::Tick(float DeltaTime)
void UCogWindowManager::Render(float DeltaTime)
{
ImGui::PushStyleColor(ImGuiCol_WindowBg, ImVec4(0, 0, 0, 0));
ImGui::DockSpaceOverViewport(0, ImGuiDockNodeFlags_PassthruCentralNode | ImGuiDockNodeFlags_NoDockingInCentralNode | ImGuiDockNodeFlags_AutoHideTabBar);
ImGui::DockSpaceOverViewport(0, ImGuiDockNodeFlags_PassthruCentralNode | ImGuiDockNodeFlags_NoDockingOverCentralNode | ImGuiDockNodeFlags_AutoHideTabBar);
ImGui::PopStyleColor(1);
@@ -14,10 +14,10 @@ struct COGABILITY_API FCogAbilityCheat
{
GENERATED_BODY()
UPROPERTY(EditAnywhere)
UPROPERTY(EditAnywhere, Category="Cog")
FString Name;
UPROPERTY(EditAnywhere)
UPROPERTY(EditAnywhere, Category="Cog")
TSubclassOf<UGameplayEffect> Effect;
};
@@ -27,25 +27,25 @@ struct COGABILITY_API FCogAbilityPool
{
GENERATED_BODY()
UPROPERTY(EditAnywhere)
UPROPERTY(EditAnywhere, Category="Cog")
FString Name;
UPROPERTY(EditAnywhere)
UPROPERTY(EditAnywhere, Category="Cog")
FGameplayAttribute Value;
UPROPERTY(EditAnywhere)
UPROPERTY(EditAnywhere, Category="Cog")
FGameplayAttribute Min;
UPROPERTY(EditAnywhere)
UPROPERTY(EditAnywhere, Category="Cog")
FGameplayAttribute Max;
UPROPERTY(EditAnywhere)
UPROPERTY(EditAnywhere, Category="Cog")
FGameplayAttribute Regen;
UPROPERTY(EditAnywhere)
UPROPERTY(EditAnywhere, Category="Cog")
FLinearColor Color = FLinearColor(0.5f, 0.5f, 0.5f, 1.0f);
UPROPERTY(EditAnywhere)
UPROPERTY(EditAnywhere, Category="Cog")
FLinearColor BackColor = FLinearColor(0.15, 0.15, 0.15, 1.0f);
};
@@ -56,16 +56,16 @@ struct FCogAbilityTweak
{
GENERATED_BODY()
UPROPERTY(EditAnywhere)
UPROPERTY(EditAnywhere, Category="Cog")
FName Name;
UPROPERTY(EditAnywhere)
UPROPERTY(EditAnywhere, Category="Cog")
TSubclassOf<UGameplayEffect> Effect;
UPROPERTY(EditAnywhere)
UPROPERTY(EditAnywhere, Category="Cog")
float Multiplier = 0.01f;
UPROPERTY(EditAnywhere)
UPROPERTY(EditAnywhere, Category="Cog")
float AddPostMultiplier = 1.0f;
};
@@ -75,22 +75,22 @@ struct FCogAbilityTweakCategory
{
GENERATED_BODY()
UPROPERTY(EditAnywhere)
UPROPERTY(EditAnywhere, Category="Cog")
FString Name;
UPROPERTY(EditAnywhere)
UPROPERTY(EditAnywhere, Category="Cog")
FGameplayTag Id;
UPROPERTY(EditAnywhere)
UPROPERTY(EditAnywhere, Category="Cog")
TSubclassOf<AActor> ActorClass;
UPROPERTY(EditAnywhere)
UPROPERTY(EditAnywhere, Category="Cog")
FGameplayTagContainer RequiredTags;
UPROPERTY(EditAnywhere)
UPROPERTY(EditAnywhere, Category="Cog")
FGameplayTagContainer IgnoredTags;
UPROPERTY(EditAnywhere)
UPROPERTY(EditAnywhere, Category="Cog")
FLinearColor Color = FLinearColor::White;
};
@@ -100,13 +100,13 @@ struct FCogAbilityTweakProfileValue
{
GENERATED_BODY()
UPROPERTY(EditAnywhere)
UPROPERTY(EditAnywhere, Category="Cog")
TSubclassOf<UGameplayEffect> Effect;
UPROPERTY(EditAnywhere)
UPROPERTY(EditAnywhere, Category="Cog")
FGameplayTag CategoryId;
UPROPERTY(EditAnywhere)
UPROPERTY(EditAnywhere, Category="Cog")
float Value = 0.0f;
};
@@ -116,10 +116,10 @@ struct FCogAbilityTweakProfile
{
GENERATED_BODY()
UPROPERTY(EditAnywhere)
UPROPERTY(EditAnywhere, Category="Cog")
FName Name;
UPROPERTY(EditAnywhere)
UPROPERTY(EditAnywhere, Category="Cog")
TArray<FCogAbilityTweakProfileValue> Tweaks;
};
@@ -15,6 +15,6 @@ class COGINPUT_API UCogInputDataAsset : public UPrimaryDataAsset
public:
UCogInputDataAsset() {}
UPROPERTY(EditAnywhere)
UPROPERTY(EditAnywhere, Category="Cog")
TArray<TObjectPtr<const UInputMappingContext>> MappingContexts;
};