Ok, I assigned the IIItemFrame interface (C++) to my Blueprint User Widget but when I try to pass it to C++ class it always returns 0x000000 for the InterfacePointer.
I even cast it to check if it exists in the User Widget, which it does, but when I pass it to C++ object it is always null;
While I do know that Unreal recommends this approach:
if (InterfaceObject && InterfaceObject->GetClass()
->ImplementsInterface(UIItemFrame::StaticClass()))
{
IIItemFrame::Execute_SomeFunction(InterfaceObject);
}
I just do not like this approach. I am very new in Unreal Engine (3-4 weeks) and I am probably wrong in doing it my way but it works. I understand there are no safety checks when using “reinterpret_cast” but it did copy the adress of the pointer to my Action.
The result is below:
I know it is “Error” but I am using Error parameter in UE_LOG because i can see it much clearer. It is for debugging only.