- KCoppinsIventis
- Posts: 12
- Joined:
UNoesisInstance::GetCachedWidget causes linker error
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"
- KCoppinsIventis
- Posts: 12
- Joined:
Re: UNoesisInstance::GetCachedWidget causes linker error
I have figured out my issue, nothing with NoesisGUI. I just had to include the UMG public dependency module in my module's build.cs:
Code: Select all
PublicDependencyModuleNames.AddRange(new string[] { "UMG" });
-
sfernandez
Site Admin
- Posts: 3008
- Joined:
Re: UNoesisInstance::GetCachedWidget causes linker error
Thanks for sharing the solution, even if it wasn't a Noesis issue :)
Who is online
Users browsing this forum: No registered users and 3 guests