This commit is contained in:
2025-05-16 19:52:23 +02:00
parent ad36ec80dd
commit 39d2d51a2f
1534 changed files with 53861 additions and 116603 deletions

View File

@@ -1,4 +1,4 @@
// Copyright Epic Games, Inc. All Rights Reserved.
// Copyright TheShibaDoggo. All Rights Reserved.
#include "ReloadEditor.h"
#include "ReloadEditorStyle.h"
@@ -281,9 +281,30 @@ void FReloadEditorModule::PluginButtonClicked()
if (Settings->bAutoReloadLastMap)
{
UWorld* EditorWorld = GEditor->GetEditorWorldContext().World();
FString CurrentMap = EditorWorld->GetOutermost()->GetName();
FString MapFilePath = FPackageName::LongPackageNameToFilename(CurrentMap, FPackageName::GetMapPackageExtension());
CmdLine = FString::Printf(TEXT("\"%s\" %s -reloadmap=\"%s\""), *ProjectFile, FCommandLine::Get(), *MapFilePath);
if (EditorWorld)
{
FString CurrentMap = EditorWorld->GetOutermost()->GetName();
FString MapFilePath = FPackageName::LongPackageNameToFilename(CurrentMap, FPackageName::GetMapPackageExtension());
// Vérifier si le fichier de carte existe et s'il est compatible
if (FPaths::FileExists(MapFilePath))
{
// Option 1: Toujours essayer de charger, mais avec un flag indiquant que nous savons qu'il pourrait y avoir un problème
CmdLine = FString::Printf(TEXT("\"%s\" %s -reloadmap=\"%s\" -allowincompatiblemap"), *ProjectFile, FCommandLine::Get(), *MapFilePath);
// Alternative: désactiver le rechargement automatique si un problème est détecté
// CmdLine = FString::Printf(TEXT("\"%s\" %s"), *ProjectFile, FCommandLine::Get());
}
else
{
// Si le fichier n'existe pas, ne pas essayer de le recharger
CmdLine = FString::Printf(TEXT("\"%s\" %s"), *ProjectFile, FCommandLine::Get());
}
}
else
{
CmdLine = FString::Printf(TEXT("\"%s\" %s"), *ProjectFile, FCommandLine::Get());
}
}
else
{

View File

@@ -1,4 +1,4 @@
// Copyright Epic Games, Inc. All Rights Reserved.
// Copyright TheShibaDoggo. All Rights Reserved.
#include "ReloadEditorCommands.h"

View File

@@ -1,4 +1,6 @@
#include "ReloadEditorSettings.h"
// Copyright TheShibaDoggo. All Rights Reserved.
#include "ReloadEditorSettings.h"
UReloadEditorSettings::UReloadEditorSettings()
{

View File

@@ -1,4 +1,4 @@
// Copyright Epic Games, Inc. All Rights Reserved.
// Copyright TheShibaDoggo. All Rights Reserved.
#include "ReloadEditorStyle.h"
#include "ReloadEditor.h"

View File

@@ -1,4 +1,4 @@
// Copyright Epic Games, Inc. All Rights Reserved.
// Copyright TheShibaDoggo. All Rights Reserved.
#pragma once

View File

@@ -1,4 +1,4 @@
// Copyright Epic Games, Inc. All Rights Reserved.
// Copyright TheShibaDoggo. All Rights Reserved.
#pragma once

View File

@@ -1,4 +1,6 @@
#pragma once
// Copyright TheShibaDoggo. All Rights Reserved.
#pragma once
#include "CoreMinimal.h"
#include "UObject/NoExportTypes.h"

View File

@@ -1,4 +1,4 @@
// Copyright Epic Games, Inc. All Rights Reserved.
// Copyright TheShibaDoggo. All Rights Reserved.
#pragma once