Support Unreal 5.5. Fix Multi PIE not working when running under one process.

This commit is contained in:
Arnaud Jamin
2024-12-31 01:11:11 -05:00
parent 3539881135
commit 19d88558cb
21 changed files with 339 additions and 77 deletions
@@ -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)
@@ -5,6 +5,7 @@
#include "CogEngineWindow_ImGui.h"
#include "CogImguiHelper.h"
#include "CogImguiInputHelper.h"
#include "CogWindowConsoleCommandManager.h"
#include "CogWindowManager.h"
#include "CogWindowWidgets.h"
#include "Components/PrimitiveComponent.h"
@@ -27,11 +28,14 @@ void FCogEngineWindow_Selection::Initialize()
Config = GetConfig<UCogEngineConfig_Selection>();
ConsoleCommands.Add(IConsoleManager::Get().RegisterConsoleCommand(
FCogWindowConsoleCommandManager::RegisterWorldConsoleCommand(
*ToggleSelectionModeCommand,
TEXT("Toggle the actor selection mode"),
FConsoleCommandWithArgsDelegate::CreateLambda([this](const TArray<FString>& Args) { ToggleSelectionMode(); }),
ECVF_Cheat));
GetWorld(),
FCogWindowConsoleCommandDelegate::CreateLambda([this](const TArray<FString>& InArgs, UWorld* InWorld)
{
ToggleSelectionMode();
}));
TryReapplySelection();
}
@@ -50,10 +54,6 @@ void FCogEngineWindow_Selection::RenderHelp()
//--------------------------------------------------------------------------------------------------------------------------
void FCogEngineWindow_Selection::Shutdown()
{
for (IConsoleObject* ConsoleCommand : ConsoleCommands)
{
IConsoleManager::Get().UnregisterConsoleObject(ConsoleCommand);
}
}
//--------------------------------------------------------------------------------------------------------------------------