UNoesisInstance::GetCachedWidget causes linker error
Posted: 21 Mar 2024, 20:18
Hi there,
I am trying to get the cached widget to set my input mode in C++:
However this causes the following linker error:
I have tried including the following headers in both my header and main file:
Which header am I missing or is there something else here entirely? Thanks for any help!
I am trying to get the cached widget to set my input mode in C++:
Code: Select all
auto InputMode = FInputModeUIOnly();
InputMode.SetWidgetToFocus(NoesisInstance->GetCachedWidget());
UserController->SetInputMode(InputMode);
Code: Select all
unresolved external symbol "__declspec(dllimport) public: class TSharedPtr<class SWidget,1> __cdecl UWidget::GetCachedWidget(void)const " (__imp_?GetCachedWidget@UWidget@@QEBA?AV?$TSharedPtr@VSWidget@@$00@@XZ) referenced in function "public: void __cdecl UMainViewModel::ToggleLocationSelector(void)" (?ToggleLocationSelector@UMainViewModel@@QEAAXXZ)
Code: Select all
#include "NoesisRuntime.h"
#include "Widgets/SUserWidget.h"
#include "Blueprint/UserWidget.h"
#include "Widgets/SWidget.h"
#include "Components/Widget.h"