So I have to cast to a widget blueprint from another widget blueprint. I used to use the “get all widgets of class” function, but in this case it fails everytime. Any suggestions ?
It means you don’t have any widgets of that type running at the moment ( instanced ).
1 Like
And how to solve this issue in my case?
Create the widget first. You cannot access something that does not exist.
3 Likes
In Addition to Everynone:
Always do a valid check before trying to use reference and stuff.
2 ways for you.
1.: Check if the Length of the GetAllActorsOfClass Array is bigger than 0.
2.: If you store something in a variable, get this variable (drag drop into graph), rightclick it and convert to validate check.
Be sure to always checked for such things, to avoid None Property Errors and failed casts.
2 Likes