"Slate", "SlateCore", "ApplicationCore"添加依赖
PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "InputCore", "HeadMountedDisplay",
"Slate", "SlateCore", "ApplicationCore"});
#include "Windows/AllowWindowsPlatformTypes.h"
#include <windows.h>
#include <shellapi.h>
#include "Windows/HideWindowsPlatformTypes.h"
if (GEngine && GEngine->GameViewport && GEngine->GameViewport->GetWindow())
{
if (auto NativeWindowPtr = GEngine->GameViewport->GetWindow()->GetNativeWindow())
{
Windows::HWND handle = (Windows::HWND)NativeWindowPtr->GetOSWindowHandle();
::SetWindowPos(handle, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE);
}
}