Compilation error appears only when I add the UWidget variable. Or I declare UWidget in a function.
I re-generated the project, it did not help.
Engine version 4.26
UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = “Interact”)
UWidget* WInteract;
I saved the link as a UObject and cast on UWidget then an error also appears.
If you remove UPROPERTY, everything compiles, but I need to expand the variable in BP, then I tried to transfer and write it through a function, then this also leads to the same error.
Error
unresolved external symbol “__declspec(dllimport) class UClass * __cdecl Z_Construct_UClass_UWidget_NoRegister(void)” (_imp?Z_Construct_UClass_UWidget_NoRegister@@YAPEAVUClass@@anonymous_user_9674a66c) в функции “void __cdecl `dynamic initializer for ‘public: static struct UE4CodeGen_Private::FObjectPropertyParams const Z_Construct_UClass_APlace_Statics::NewProp_WInteract’'(void)” (??__E?NewProp_WInteract@Z_Construct_UClass_APlace_Statics@@2UFObjectPropertyParams@UE4CodeGen_Private@@anonymous_user_31e84eb0@@YAXXZ).