You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
* The original .uproject file is now compiled into monolithic executables when Live Coding is enabled. This allows invoking UBT with the original project file when the executable is staged to a different directory. This parameter can be overriden via the LiveCoding.SourceProject cvar. * The original engine directory is also compiled into the executable. This allows finding the console executable path without having to enter it manually via the LiveCoding.ConsolePath cvar. * If an exact match for a binary filename is not found, try to find a match by name only. Also required to support staged builds for 'Launch On', etc... * Add a LiveCoding.Compile command to trigger a compile from the console. #rb none #jira UE-72677 #jira UE-72678 #jira UE-72683 [CL 6625676 by Ben Marsh in Dev-Build branch]
65 lines
1.7 KiB
C++
65 lines
1.7 KiB
C++
// Copyright 1998-2019 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;
|
|
|
|
class FLiveCodingModule final : public ILiveCodingModule
|
|
{
|
|
public:
|
|
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 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;
|
|
|
|
private:
|
|
ULiveCodingSettings* Settings;
|
|
TSharedPtr<ISettingsSection> SettingsSection;
|
|
bool bEnabledLastTick;
|
|
bool bEnabledForSession;
|
|
bool bStarted;
|
|
bool bUpdateModulesInTick;
|
|
TSet<FName> ConfiguredModules;
|
|
|
|
const FString FullEnginePluginsDir;
|
|
const FString FullProjectDir;
|
|
const FString FullProjectPluginsDir;
|
|
|
|
IConsoleCommand* EnableCommand;
|
|
IConsoleCommand* CompileCommand;
|
|
IConsoleVariable* ConsolePathVariable;
|
|
IConsoleVariable* SourceProjectVariable;
|
|
FDelegateHandle EndFrameDelegateHandle;
|
|
FDelegateHandle ModulesChangedDelegateHandle;
|
|
|
|
bool StartLiveCoding();
|
|
|
|
void OnModulesChanged(FName ModuleName, EModuleChangeReason Reason);
|
|
|
|
void UpdateModules();
|
|
|
|
bool ShouldPreloadModule(const FName& Name, const FString& FullFilePath) const;
|
|
};
|
|
|