Files
UnrealEngineUWP/Engine/Source/Editor/LevelInstanceEditor/Private/LevelInstanceEditorMode.h
patrick enfedaque d7a6799ccd LevelInstance: Exit Mode on PIE (allow saving)
#rb richard.malo

#ROBOMERGE-AUTHOR: patrick.enfedaque
#ROBOMERGE-SOURCE: CL 18314849 in //UE5/Release-5.0/... via CL 18315823
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v895-18170469)

[CL 18316174 by patrick enfedaque in ue5-release-engine-test branch]
2021-11-29 16:26:46 -05:00

46 lines
1.1 KiB
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "CoreMinimal.h"
#include "Tools/UEdMode.h"
#include "Framework/Commands/UICommandList.h"
#include "LevelInstanceEditorMode.generated.h"
UCLASS()
class ULevelInstanceEditorMode : public UEdMode
{
GENERATED_BODY()
public:
static FEditorModeID EM_LevelInstanceEditorModeId;
/** Constructor */
ULevelInstanceEditorMode();
/** Destructor */
virtual ~ULevelInstanceEditorMode();
// Begin UEdMode
virtual void Enter() override;
virtual void Exit() override;
virtual void CreateToolkit() override;
virtual bool IsCompatibleWith(FEditorModeID OtherModeID) const override { return true; }
/** Check to see if an actor can be selected in this mode - no side effects */
virtual bool IsSelectionDisallowed(AActor* InActor, bool bInSelection) const override;
// End UEdMode
private:
void OnPreBeginPIE(bool bSimulate);
void UpdateEngineShowFlags();
virtual void BindCommands() override;
void ExitModeCommand();
void ToggleContextRestrictionCommand();
bool IsContextRestrictionCommandEnabled() const;
bool bContextRestriction;
};