Set Parameter in Widget

I’m trying to create a widget BP with some instance editable variables and then add it to a tile view, but in runtime I get the error “Access none trying to read property…”, like it’s not reading my variables.
What am I doing wrong?

There’s not nearly enough information here to give a good response. Without understanding your system, I can only offer a way to debug.

Make sure you do an IsValid macro off of each object reference, and run a PrintString from the IsNotValid pin with some text saying which variable it is that’s invalid.

It looks like you’re trying to push in widgets into the tile view while you should be pushing in objects with exposed data pins:

image

The tile view will handle the construction and destruction of the widgets on its own. Tile / List view work the same.

So I basically changed it a bit: I have an actor blueprint that contains a mesh, a widget, an index id and an array of other meshes (variations). This code happens inside the widget - It takes the the index of each mesh inside the variations array and the original actor’s mesh and put it inside of a newly created asset widget, which is added to a tile view (variations box). The asset widget contains a button that when pressed it changes the index id of the original actor BP. The thing is that when pressing the button the widget doesn’t recognize the asset object or the variation id (and yes, they are valid before that).

Gives the same results…

It’s been so long since this was posted, but just want to reply since I just got the same issue.

I had a custom witdget containing an image and a text, I wanted to get those as parameters on creation.

I added two variables and set those as exposed on spawn, then I was able to set values when using the Construct Widget node.

But after that somehow the values got lost, logging on the Event Construct of the widget showed null/empty values on the created instance.

I ended up using the Event On List Object Set, the object injected on that event had the values I was injecting, so, then I was able to manually set the values to the Image and Text widgets contained on my widget.

Hope this is clear enough.

By the way, is this a bug on the binging of the widget variables?
Or in the construction of user widgets?