Patch
This commit is contained in:
@@ -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
|
||||
{
|
||||
|
@@ -1,4 +1,4 @@
|
||||
// Copyright Epic Games, Inc. All Rights Reserved.
|
||||
// Copyright TheShibaDoggo. All Rights Reserved.
|
||||
|
||||
#include "ReloadEditorCommands.h"
|
||||
|
||||
|
@@ -1,4 +1,6 @@
|
||||
#include "ReloadEditorSettings.h"
|
||||
// Copyright TheShibaDoggo. All Rights Reserved.
|
||||
|
||||
#include "ReloadEditorSettings.h"
|
||||
|
||||
UReloadEditorSettings::UReloadEditorSettings()
|
||||
{
|
||||
|
@@ -1,4 +1,4 @@
|
||||
// Copyright Epic Games, Inc. All Rights Reserved.
|
||||
// Copyright TheShibaDoggo. All Rights Reserved.
|
||||
|
||||
#include "ReloadEditorStyle.h"
|
||||
#include "ReloadEditor.h"
|
||||
|
@@ -1,4 +1,4 @@
|
||||
// Copyright Epic Games, Inc. All Rights Reserved.
|
||||
// Copyright TheShibaDoggo. All Rights Reserved.
|
||||
|
||||
#pragma once
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
// Copyright Epic Games, Inc. All Rights Reserved.
|
||||
// Copyright TheShibaDoggo. All Rights Reserved.
|
||||
|
||||
#pragma once
|
||||
|
||||
|
@@ -1,4 +1,6 @@
|
||||
#pragma once
|
||||
// Copyright TheShibaDoggo. All Rights Reserved.
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
#include "UObject/NoExportTypes.h"
|
||||
|
@@ -1,4 +1,4 @@
|
||||
// Copyright Epic Games, Inc. All Rights Reserved.
|
||||
// Copyright TheShibaDoggo. All Rights Reserved.
|
||||
|
||||
#pragma once
|
||||
|
||||
|
Reference in New Issue
Block a user