I am trying to make a game in unreal engine and want to implement a crafting system. I have already implemented a Interaction system however when I look at the crafting table the Interaction Widget does not show up even though I set the widget class. Through debugging I have traced the error to the cast failing in this function called after the object is seen.
I donât know why this would fail since in blueprints I have confirmed the widget class is a child of Interaction widget. Here is the constructor for Crafting Item.
I am new to to the Unreal Forums so if I am missing anything or have formatted my question wrong I would love the feedback. But any help would be greatly useful since I have spent weeks on this bug.
It doesnât help that the documentation page is completely wrong for interfaces - but essentially if you implemented the interface in a Blueprint class you CANNOT use âCastâ, this only works for interfaces that are implemented natively.
If the functions are Blueprint Events, you are also not allowed to call them directly. They must be called via static âExecute_â functions that UHT will auto-generate.
See the following:
if (Object->Implements<UMyInterface>())
{
IMyInterface::Execute_CustomFunction(Object, args...);
}
Ok this makes sense the Widget has blueprint implementable events. I am just wondering why the Widget would show up for other Things? However I donât exactly understand what you are recommending for the fix ill include the Widget component and Crafting Item if you could show me.