You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
#rb trivial #rnx #preflight 616701a45eae5700010b2db9 #ROBOMERGE-AUTHOR: tim.smith #ROBOMERGE-SOURCE: CL 17802769 in //UE5/Release-5.0/... via CL 17802809 #ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v881-17767770) #ROBOMERGE[STARSHIP]: UE5-Main [CL 17802827 by tim smith in ue5-release-engine-test branch]
99 lines
2.6 KiB
C++
99 lines
2.6 KiB
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#pragma once
|
|
|
|
#include "ILiveCodingModule.h"
|
|
#include "Delegates/Delegate.h"
|
|
#include "Modules/ModuleManager.h"
|
|
#include "Templates/SharedPointer.h"
|
|
|
|
struct IConsoleCommand;
|
|
class IConsoleVariable;
|
|
class ISettingsSection;
|
|
class ULiveCodingSettings;
|
|
|
|
#if WITH_EDITOR
|
|
class FReload;
|
|
#else
|
|
class FNullReload;
|
|
#endif
|
|
|
|
class FLiveCodingModule final : public ILiveCodingModule
|
|
{
|
|
public:
|
|
FLiveCodingModule();
|
|
~FLiveCodingModule();
|
|
|
|
// IModuleInterface implementation
|
|
virtual void StartupModule() override;
|
|
virtual void ShutdownModule() override;
|
|
|
|
// ILiveCodingModule implementation
|
|
virtual void EnableByDefault(bool bInEnabled) override;
|
|
virtual bool IsEnabledByDefault() const override;
|
|
virtual void EnableForSession(bool bInEnabled) override;
|
|
virtual bool IsEnabledForSession() const override;
|
|
virtual const FText& GetEnableErrorText() const override;
|
|
virtual bool AutomaticallyCompileNewClasses() const override;
|
|
virtual bool CanEnableForSession() const override;
|
|
virtual bool HasStarted() const override;
|
|
virtual void ShowConsole() override;
|
|
virtual void Compile() override;
|
|
virtual bool IsCompiling() const override;
|
|
virtual void Tick() override;
|
|
virtual FOnPatchCompleteDelegate& GetOnPatchCompleteDelegate() override;
|
|
|
|
static void BeginReload();
|
|
|
|
private:
|
|
void AttemptSyncLivePatching();
|
|
|
|
private:
|
|
ULiveCodingSettings* Settings;
|
|
TSharedPtr<ISettingsSection> SettingsSection;
|
|
bool bEnabledLastTick = false;
|
|
bool bEnableReinstancingLastTick = false;
|
|
bool bEnabledForSession = false;
|
|
bool bStarted = false;
|
|
bool bUpdateModulesInTick = false;
|
|
bool bHasReinstancingOccurred = false;
|
|
bool bHasPatchBeenLoaded = false;
|
|
TSet<FName> ConfiguredModules;
|
|
TArray<void*> LppPendingTokens;
|
|
|
|
FText EnableErrorText;
|
|
|
|
const FString FullEnginePluginsDir;
|
|
const FString FullProjectDir;
|
|
const FString FullProjectPluginsDir;
|
|
|
|
IConsoleCommand* EnableCommand;
|
|
IConsoleCommand* CompileCommand;
|
|
IConsoleVariable* ConsolePathVariable;
|
|
IConsoleVariable* SourceProjectVariable;
|
|
FDelegateHandle EndFrameDelegateHandle;
|
|
FDelegateHandle ModulesChangedDelegateHandle;
|
|
FOnPatchCompleteDelegate OnPatchCompleteDelegate;
|
|
|
|
#if WITH_EDITOR
|
|
TUniquePtr<FReload> Reload;
|
|
#else
|
|
TUniquePtr<FNullReload> Reload;
|
|
#endif
|
|
|
|
bool StartLiveCoding();
|
|
|
|
void OnModulesChanged(FName ModuleName, EModuleChangeReason Reason);
|
|
|
|
void UpdateModules();
|
|
|
|
bool ShouldPreloadModule(const FName& Name, const FString& FullFilePath) const;
|
|
|
|
bool IsReinstancingEnabled() const;
|
|
|
|
#if WITH_EDITOR
|
|
void ShowNotification(bool Success, const FText& Title, const FText* SubText);
|
|
#endif
|
|
};
|
|
|