You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
# Although there aren't references left to the object, iterating over all the things will return the thing. Flagging as garbage seems a lot testier of a change for fixing the 5.1 crash with varied lifettime of the mode and mode manager contexts, so merely tracking it and reporting the correct world here. #rnx #Jira UE-168159 #rb lauren.barnes, zach.rammell #preflight 6356f2ff3d41a4455a628b31 #lockdown jeanmichel.dignard [CL 22787075 by brooke hubert in ue5-main branch]
59 lines
1.2 KiB
C++
59 lines
1.2 KiB
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#include "Tools/AssetEditorContextObject.h"
|
|
|
|
#include "EditorModeManager.h"
|
|
#include "Elements/Framework/TypedElementSelectionSet.h"
|
|
#include "Elements/Framework/TypedElementCommonActions.h"
|
|
#include "Toolkits/IToolkitHost.h"
|
|
|
|
const UTypedElementSelectionSet* UAssetEditorContextObject::GetSelectionSet() const
|
|
{
|
|
if (GetToolkitHost())
|
|
{
|
|
return GetToolkitHost()->GetEditorModeManager().GetEditorSelectionSet();
|
|
}
|
|
|
|
return nullptr;
|
|
}
|
|
|
|
UTypedElementSelectionSet* UAssetEditorContextObject::GetMutableSelectionSet()
|
|
{
|
|
if (GetToolkitHost())
|
|
{
|
|
return GetToolkitHost()->GetEditorModeManager().GetEditorSelectionSet();
|
|
}
|
|
|
|
return nullptr;
|
|
}
|
|
|
|
UTypedElementCommonActions* UAssetEditorContextObject::GetCommonActions()
|
|
{
|
|
if (GetToolkitHost())
|
|
{
|
|
return GetToolkitHost()->GetCommonActions();
|
|
}
|
|
|
|
return nullptr;
|
|
}
|
|
|
|
UWorld* UAssetEditorContextObject::GetEditingWorld() const
|
|
{
|
|
return GetWorld();
|
|
}
|
|
|
|
const IToolkitHost* UAssetEditorContextObject::GetToolkitHost() const
|
|
{
|
|
return ToolkitHost;
|
|
}
|
|
|
|
IToolkitHost* UAssetEditorContextObject::GetMutableToolkitHost()
|
|
{
|
|
return ToolkitHost;
|
|
}
|
|
|
|
void UAssetEditorContextObject::SetToolkitHost(IToolkitHost* InToolkitHost)
|
|
{
|
|
ToolkitHost = InToolkitHost;
|
|
}
|