Hi, im trying to make a 3d scrollbox which i will fill on c++ during runtime.
i created a umg in c++ named “TabletScreen” with
UPROPERTY(meta = (BindWidget))
class UScrollBox* mScrollBox;
UPROPERTY(meta = (BindWidget))
class UWrapBox* mWrapBox;
and give this class also a getWrapBox()
UWrapBox* UPokerTabletScreen::getWrapBox()
{
return mWrapBox;
}
then extended this class with a blueprint, and attached a wrapbox and scrollbox with the same name as my variabile in the c++ class.
after this i created an actor named “tablet” in c++ with a widgetcomponent, i placed this actor in the world and put my blueprint_tabletscreen class as a variable.
after this i proceed to get first a reference to my tabletscreen class, then use the method getWrapBox to attach some textboxes but i crashed when i use getWrapBox
UPokerTabletScreen* pk = (UPokerTabletScreen*)mTabletWidgetComponent->GetUserWidgetObject();
UWrapBox* wrapBox = pk->getWrapBox();
with this error
Unhandled Exception: EXCEPTION_ACCESS_VIOLATION reading address 0x0000000000000400
UE4Editor_Poker3d_1042!UPokerTabletScreen::getWrapBox() [C:\Users\nerfl\Documents\Unreal Projects\Poker3d\Source\Poker3d\PokerTabletScreen.cpp:13]
surely im doing something wrong but i cant really figure it, my objective is to create a tablet or something like that with a scrollbox that im gonna fill dynamically