mirror of
https://github.com/Ed94/Cog.git
synced 2026-08-02 04:38:15 +00:00
fix build error
This commit is contained in:
@@ -18,7 +18,7 @@ void UCogEngineWindow_Collisions::RenderHelp()
|
||||
ImGui::Text("This window is used to inspect collisions by performing a collision query with the selected channels. "
|
||||
"The query can be configured in the options. "
|
||||
"The displayed collision channels can be configured in the '%s' data asset. "
|
||||
, TCHAR_TO_ANSI(*GetNameSafe(CollisionsAsset.Get()))
|
||||
, TCHAR_TO_ANSI(*GetNameSafe(Asset.Get()))
|
||||
);
|
||||
}
|
||||
|
||||
@@ -383,8 +383,10 @@ void UCogEngineWindow_Collisions::RenderContent()
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
void UCogEngineWindow_Collisions::SetAsset(const UCogEngineDataAsset* Asset)
|
||||
void UCogEngineWindow_Collisions::SetAsset(const UCogEngineDataAsset* Value)
|
||||
{
|
||||
Asset = Value;
|
||||
|
||||
if (Asset == nullptr)
|
||||
{
|
||||
return;
|
||||
|
||||
@@ -2,8 +2,10 @@
|
||||
|
||||
#include "imgui.h"
|
||||
#include "CogImguiHelper.h"
|
||||
#include "CogWindowWidgets.h"
|
||||
#include "Engine/Engine.h"
|
||||
|
||||
|
||||
#define SCALABILITY_NUM_LEVELS 5
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
#include "CogEngineWindow_Spawns.h"
|
||||
|
||||
#include "CogEngineDataAsset.h"
|
||||
#include "CogEngineReplicator.h"
|
||||
#include "CogImguiHelper.h"
|
||||
#include "CogWindowWidgets.h"
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
void UCogEngineWindow_Spawns::RenderHelp()
|
||||
@@ -8,7 +11,7 @@ void UCogEngineWindow_Spawns::RenderHelp()
|
||||
ImGui::Text(
|
||||
"This window can be used to spawn new actors in the world. "
|
||||
"The spawn list can be configured in the '%s' data asset. "
|
||||
, TCHAR_TO_ANSI(*GetNameSafe(SpawnAsset))
|
||||
, TCHAR_TO_ANSI(*GetNameSafe(Asset.Get()))
|
||||
);
|
||||
}
|
||||
|
||||
@@ -17,12 +20,12 @@ void UCogEngineWindow_Spawns::RenderContent()
|
||||
{
|
||||
Super::RenderContent();
|
||||
|
||||
if (SpawnAsset == nullptr)
|
||||
if (Asset == nullptr)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
for (const FCogEngineSpawnGroup& SpawnGroup : SpawnAsset->SpawnGroups)
|
||||
for (const FCogEngineSpawnGroup& SpawnGroup : Asset->SpawnGroups)
|
||||
{
|
||||
RenderSpawnGroup(SpawnGroup);
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#include "CogWindow.h"
|
||||
#include "CogEngineWindow_Collisions.generated.h"
|
||||
|
||||
class UCogEngineDataAsset_Collisions;
|
||||
class UCogEngineDataAsset;
|
||||
|
||||
UCLASS(Config = Cog)
|
||||
class COGENGINE_API UCogEngineWindow_Collisions : public UCogWindow
|
||||
@@ -15,7 +15,9 @@ public:
|
||||
|
||||
UCogEngineWindow_Collisions();
|
||||
|
||||
void SetAsset(const UCogEngineDataAsset* Asset);
|
||||
const UCogEngineDataAsset* GetAsset() const { return Asset.Get(); }
|
||||
|
||||
void SetAsset(const UCogEngineDataAsset* Value);
|
||||
|
||||
private:
|
||||
|
||||
@@ -31,8 +33,6 @@ private:
|
||||
FColor Color;
|
||||
};
|
||||
|
||||
TWeakObjectPtr<UCogEngineDataAsset> CollisionsAsset;
|
||||
|
||||
FChannel Channels[ECC_MAX];
|
||||
|
||||
UPROPERTY(Config)
|
||||
@@ -58,4 +58,7 @@ private:
|
||||
|
||||
UPROPERTY(Config)
|
||||
bool ShowQuery = false;
|
||||
|
||||
UPROPERTY()
|
||||
TWeakObjectPtr<const UCogEngineDataAsset> Asset = nullptr;
|
||||
};
|
||||
|
||||
@@ -16,9 +16,14 @@ public:
|
||||
virtual void RenderContent() override;
|
||||
|
||||
private:
|
||||
|
||||
bool bShowImguiDemo = false;
|
||||
|
||||
bool bShowImguiPlot = false;
|
||||
|
||||
bool bShowImguiMetric = false;
|
||||
|
||||
bool bShowImguiDebugLog = false;
|
||||
|
||||
bool bShowImguiStyleEditor = false;
|
||||
};
|
||||
|
||||
@@ -10,6 +10,7 @@ class COGENGINE_API UCogEngineWindow_Scalability : public UCogWindow
|
||||
GENERATED_BODY()
|
||||
|
||||
public:
|
||||
|
||||
virtual void RenderHelp() override;
|
||||
|
||||
virtual void RenderContent() override;
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
|
||||
class UCogEngineDataAsset;
|
||||
struct FCogEngineSpawnGroup;
|
||||
struct FCogEngineSpawnEntry;
|
||||
|
||||
UCLASS()
|
||||
class COGENGINE_API UCogEngineWindow_Spawns : public UCogWindow
|
||||
@@ -14,9 +15,9 @@ class COGENGINE_API UCogEngineWindow_Spawns : public UCogWindow
|
||||
|
||||
public:
|
||||
|
||||
const UCogEngineDataAsset* GetSpawnsAsset() const { return SpawnAsset; }
|
||||
const UCogEngineDataAsset* GetAsset() const { return Asset.Get(); }
|
||||
|
||||
void SetAsset(const UCogEngineDataAsset* Value) { SpawnAsset = Value; }
|
||||
void SetAsset(const UCogEngineDataAsset* Value) { Asset = Value; }
|
||||
|
||||
protected:
|
||||
|
||||
@@ -30,5 +31,6 @@ protected:
|
||||
|
||||
private:
|
||||
|
||||
const UCogEngineDataAsset* SpawnAsset = nullptr;
|
||||
UPROPERTY()
|
||||
TWeakObjectPtr<const UCogEngineDataAsset> Asset = nullptr;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user