Progress on testing Cog

This commit is contained in:
Edward R. Gonzalez 2024-04-09 18:34:23 -04:00
parent 1a2d8582f4
commit c1f114b21b
13 changed files with 125 additions and 22 deletions

2
.gitignore vendored
View File

@ -8,3 +8,5 @@ Project/Surgo.sln
Project/Saved/ShaderDebugInfo Project/Saved/ShaderDebugInfo
Project/Saved/Autosaves Project/Saved/Autosaves
Project/Saved/Config/CrashReportClient Project/Saved/Config/CrashReportClient
Project/Saved/SourceControl
Project/Saved/Crashes

View File

@ -5169,18 +5169,6 @@
"Path": "$(EngineDir)/Plugins/Surgo/Cog/Binaries/Win64/UnrealEditor.modules", "Path": "$(EngineDir)/Plugins/Surgo/Cog/Binaries/Win64/UnrealEditor.modules",
"Type": "RequiredResource" "Type": "RequiredResource"
}, },
{
"Path": "$(EngineDir)/Plugins/Surgo/UE_ImGui/Binaries/Win64/UnrealEditor-UE_ImGui.dll",
"Type": "DynamicLibrary"
},
{
"Path": "$(EngineDir)/Plugins/Surgo/UE_ImGui/Binaries/Win64/UnrealEditor-UE_ImGui.pdb",
"Type": "SymbolFile"
},
{
"Path": "$(EngineDir)/Plugins/Surgo/UE_ImGui/Binaries/Win64/UnrealEditor.modules",
"Type": "RequiredResource"
},
{ {
"Path": "$(EngineDir)/Plugins/VirtualProduction/Takes/Binaries/Win64/UnrealEditor-CacheTrackRecorder.dll", "Path": "$(EngineDir)/Plugins/VirtualProduction/Takes/Binaries/Win64/UnrealEditor-CacheTrackRecorder.dll",
"Type": "DynamicLibrary" "Type": "DynamicLibrary"
@ -28635,10 +28623,6 @@
"Path": "$(EngineDir)/Plugins/Surgo/Cog/Cog.uplugin", "Path": "$(EngineDir)/Plugins/Surgo/Cog/Cog.uplugin",
"Type": "UFS" "Type": "UFS"
}, },
{
"Path": "$(EngineDir)/Plugins/Surgo/UE_ImGui/UE_ImGui.uplugin",
"Type": "UFS"
},
{ {
"Path": "$(EngineDir)/Plugins/VirtualProduction/Takes/Takes.uplugin", "Path": "$(EngineDir)/Plugins/VirtualProduction/Takes/Takes.uplugin",
"Type": "UFS" "Type": "UFS"
@ -28718,7 +28702,6 @@
"StructUtils", "StructUtils",
"Takes", "Takes",
"TextureFormatOodle", "TextureFormatOodle",
"UE_ImGui",
"VariantManager", "VariantManager",
"VariantManagerContent", "VariantManagerContent",
"WaveTable", "WaveTable",

BIN
Project/Content/Blueprints/TempGameMode.uasset (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -0,0 +1,7 @@
// This is a low-cost header filled mostly with defines or forwards.
// Do not fill this with a bunch of actual definitions.
#include "CogCommon.h"
// Cog Forwards
class UCogWindowManager;

View File

@ -0,0 +1,34 @@
#include "SuGameState.h"
#include "CogAll.h"
#include "CogWindowManager.h"
ASuGameState::ASuGameState()
{
// Enable ticking
PrimaryActorTick.bCanEverTick = true;
PrimaryActorTick.SetTickFunctionEnable(true);
PrimaryActorTick.bStartWithTickEnabled = true;
}
#pragma region GameState
void ASuGameState::BeginPlay()
{
#if ENABLE_COG
CogWindowManager = NewObject<UCogWindowManager>(this);
CogWindowManagerRef = CogWindowManager;
// Add all the built-in windows
Cog::AddAllWindows(*CogWindowManager);
#endif //ENABLE_COG
}
void ASuGameState::Tick(float DeltaSeconds)
{
Super::Tick(DeltaSeconds);
#if ENABLE_COG
CogWindowManager->Tick(DeltaSeconds);
#endif //ENABLE_COG
}
#pragma endregion GameState

View File

@ -0,0 +1,32 @@
#pragma once
#include "CoreMinimal.h"
#include "GameFramework/GameState.h"
#include "SuCommon.h"
#include "SuGameState.generated.h"
UCLASS(BlueprintType)
class SURGO_API ASuGameState : public AGameState
{
GENERATED_BODY()
public:
ASuGameState();
// To make sure it doesn't get garbage collected.
UPROPERTY()
TObjectPtr<UObject> CogWindowManagerRef = nullptr;
#if ENABLE_COG
TObjectPtr<UCogWindowManager> CogWindowManager = nullptr;
#endif // ENABLE_COG
#pragma region GameState
void BeginPlay() override;
void Tick(float DeltaSeconds) override;
#pragma endregion GameState
};

View File

@ -3,6 +3,8 @@ using System.Collections.Generic;
using ModuleRules = UnrealBuildTool.ModuleRules; using ModuleRules = UnrealBuildTool.ModuleRules;
using ReadOnlyTargetRules = UnrealBuildTool.ReadOnlyTargetRules; using ReadOnlyTargetRules = UnrealBuildTool.ReadOnlyTargetRules;
using TargetRules = UnrealBuildTool.TargetRules;
using UnrealTargetConfiguration = UnrealBuildTool.UnrealTargetConfiguration;
public class Surgo : ModuleRules public class Surgo : ModuleRules
{ {
@ -14,9 +16,43 @@ public class Surgo : ModuleRules
}); });
PrivateDependencyModuleNames.AddRange(new string[] { PrivateDependencyModuleNames.AddRange(new string[] {
"Core", "Core",
"AIModule",
"CoreUObject",
"Engine",
"EnhancedInput",
"GameplayAbilities",
"GameplayTags",
"GameplayTasks",
"InputCore",
"NetCore",
"Niagara",
}); });
#endregion Engine #endregion Engine
#region Plugins
if (Target.Configuration != UnrealTargetConfiguration.Shipping && Target.Type != TargetRules.TargetType.Server)
{
PrivateIncludePathModuleNames.AddRange( new string[]
{
"CogCommon",
});
PrivateDependencyModuleNames.AddRange(new string[]
{
// "UE_ImGui",
"CogCommon",
"CogAbility",
"CogAI",
"CogAll",
"CogDebug",
"CogEngine",
"CogImgui",
"CogInput",
"CogWindow",
});
}
#endregion Plugins
PublicIncludePathModuleNames.Add("Surgo"); PublicIncludePathModuleNames.Add("Surgo");
} }
} }

View File

@ -262,10 +262,6 @@
"Name": "SteamAudio", "Name": "SteamAudio",
"Enabled": true "Enabled": true
}, },
{
"Name": "UE_ImGui",
"Enabled": true
},
{ {
"Name": "Cog", "Name": "Cog",
"Enabled": true "Enabled": true
@ -278,12 +274,16 @@
"Name": "CogAI", "Name": "CogAI",
"Enabled": true "Enabled": true
}, },
{
"Name": "CogInput",
"Enabled": true
},
{ {
"Name": "CogAll", "Name": "CogAll",
"Enabled": true "Enabled": true
}, },
{ {
"Name": "CogInput", "Name": "GameplayAbilities",
"Enabled": true "Enabled": true
} }
], ],

View File

@ -322,6 +322,12 @@ function setup-cog
} }
setup-cog setup-cog
function setup-tracy
{
$url_ue_tracy = 'https://github.com/Nesquick0/TracyUnrealPlugin.git'
}
# setup_tracy
& .\GenerateProjectFiles.bat & .\GenerateProjectFiles.bat
pop-location # $path_ue pop-location # $path_ue