I want to know if the window is resized so I want to bind a function to the OnSceneViewportResizeDel in FSceneViewport.
So I did this:
FSceneViewport* pSceneViewport = GetGameViewport();
FOnSceneViewportResize InOnSceneViewportResize;
InOnSceneViewportResize.BindUObject(this, &UMyGameViewportClient::OnResize);
InOnSceneViewportResize.Execute(FVector2D());
pSceneViewport->SetOnSceneViewportResizeDel(InOnSceneViewportResize);
As soon as I hit play I get following exception:
TBaseDelegate_OneParam::operator=() 0xd948ca61 + 11 bytes [File=e:\unreal engine\unrealengine-4.3\engine\source\runtime\core\public\delegates\delegatesignatureimpl.inl:629] [in E:\Unreal Engine\UnrealEngine-4.3\Engine\Binaries\Win64\UE4Editor-Engine.dll]
FSceneViewport::SetOnSceneViewportResizeDel() 0xd94cf772 + 12 bytes [File=e:\unreal engine\unrealengine-4.3\engine\source\runtime\engine\public\slate\sceneviewport.h:161] [in E:\Unreal Engine\UnrealEngine-4.3\Engine\Binaries\Win64\UE4Editor-Engine.dll]
UMyGameViewportClient::Init() 0xd2cb266f + 69 bytes [File=e:\unreal projects\nstopdowncameratask\source\nstopdowncameratask\private\mygameviewportclient.cpp:25] [in E:\Unreal Projects\NSTopDownCameraTask\Binaries\Win64\UE4Editor-NSTopDownCameraTask.dll]
UEditorEngine::CreatePlayInEditorWorld() 0xd7d86bae + 16 bytes [File=e:\unreal engine\unrealengine-4.3\engine\source\editor\unrealed\private\playlevel.cpp:2494] [in E:\Unreal Engine\UnrealEngine-4.3\Engine\Binaries\Win64\UE4Editor-UnrealEd.dll]
UEditorEngine::PlayInEditor() 0xd7da63b5 + 0 bytes [File=e:\unreal engine\unrealengine-4.3\engine\source\editor\unrealed\private\playlevel.cpp:1997] [in E:\Unreal Engine\UnrealEngine-4.3\Engine\Binaries\Win64\UE4Editor-UnrealEd.dll]
UEditorEngine::StartQueuedPlayMapRequest() 0xd7db60e9 + 0 bytes [File=e:\unreal engine\unrealengine-4.3\engine\source\editor\unrealed\private\playlevel.cpp:836] [in E:\Unreal Engine\UnrealEngine-4.3\Engine\Binaries\Win64\UE4Editor-UnrealEd.dll]
UEditorEngine::Tick() 0xd7ba28b8 + 13 bytes [File=e:\unreal engine\unrealengine-4.3\engine\source\editor\unrealed\private\editor.cpp:1096] [in E:\Unreal Engine\UnrealEngine-4.3\Engine\Binaries\Win64\UE4Editor-UnrealEd.dll]
UUnrealEdEngine::Tick() 0xd7f7e956 + 0 bytes [File=e:\unreal engine\unrealengine-4.3\engine\source\editor\unrealed\private\unrealedengine.cpp:252] [in E:\Unreal Engine\UnrealEngine-4.3\Engine\Binaries\Win64\UE4Editor-UnrealEd.dll]
FEngineLoop::Tick() 0x40007092 + 0 bytes [File=e:\unreal engine\unrealengine-4.3\engine\source\runtime\launch\private\launchengineloop.cpp:2084] [in E:\Unreal Engine\UnrealEngine-4.3\Engine\Binaries\Win64\UE4Editor.exe]
GuardedMain() 0x3fffc8cc + 0 bytes [File=e:\unreal engine\unrealengine-4.3\engine\source\runtime\launch\private\launch.cpp:133] [in E:\Unreal Engine\UnrealEngine-4.3\Engine\Binaries\Win64\UE4Editor.exe]
GuardedMainWrapper() 0x3fffc93a + 5 bytes [File=e:\unreal engine\unrealengine-4.3\engine\source\runtime\launch\private\windows\launchwindows.cpp:125] [in E:\Unreal Engine\UnrealEngine-4.3\Engine\Binaries\Win64\UE4Editor.exe]
WinMain() 0x40008499 + 17 bytes [File=e:\unreal engine\unrealengine-4.3\engine\source\runtime\launch\private\windows\launchwindows.cpp:207] [in E:\Unreal Engine\UnrealEngine-4.3\Engine\Binaries\Win64\UE4Editor.exe]
__tmainCRTStartup() 0x40009339 + 21 bytes [File=f:\dd\vctools\crt\crtw32\dllstuff\crtexe.c:618] [in E:\Unreal Engine\UnrealEngine-4.3\Engine\Binaries\Win64\UE4Editor.exe]
Address = 0x76d459ed (filename not found) [in C:\Windows\system32\kernel32.dll]
Address = 0x76e7c541 (filename not found) [in C:\Windows\SYSTEM32\ntdll.dll]
Address = 0x76e7c541 (filename not found) [in C:\Windows\SYSTEM32\ntdll.dll]
I don’t know what I am doing wrong. Does someone has an idea how to fix that or how to catch the window resizing without changing the unreal engine code.