I checked the level blueprint of the test world and there is nothing that includes this particular widget. I’d appreciate some feedback if anyone has any idea what could cause this error. Thanks in advance.
So I’ve seemed to fix the issue simply by casting after interacting with the object and not at the event beginplay. though it’s still a mystery to me why it just decides to work in one and not in the other level.
Well you can see by the error that the WidgetREF2 is set to none.
I think adding a more information would help debug especially screen shots of where and how you are adding it to the screen, rhw blueprint being executed with play animation and where you are setting WidgetREF2 variable (if its a variable?)
I suggest also perhaps just setting a break point there and seeing if its being called.
What is the top pic supposed to do, it makes no sense. How many widgets are there?
Perhaps you could explain what we’re dealing with. Seeing Get All Widgets makes me immediately feel this is going nowhere very soon. Tell us what Interaction we’re talking about and how it’s supposed to work. Something to do with counting bullets!
Also, you said:
I checked the level blueprint of the test world and there is nothing that includes this particular widget.
But it’s very clearly there. If you want to see why the errors appear, Print the Length of this array:
You’re supposed to get a keycard to proceed. this widget is just supposed to hint at what you are supposed to do. I’m not using “crate a widget” as I’m using the same one for more than one purpose (which might just be a poor decision) and I’ve already created the widget on event begin play in the third person blueprint. The problem is there that it works just fine on one level but not on the other. And that’s not the only widget with animation I just figured that if I find whats wrong with this one I’ll fix the other one as well.
It could be the order of execution, you attempt to get a widget before it ends up in the viewport. If you already have a widget in the player BP, why not get it from there and play its animation. No need to look up anything.
Thank you for the help and for telling me a better way to get widgets created in other blueprints.
I don’t know man, it’s working so I’m not milking it anymore. Maybe when I’m optimizing the game, as even now it’s running with 30 fps on my PC (even though I can’t say it’s very overkill I’m still running everything on low so optimizing the game is not a choice at this point)
The above has nothing to do with optimisation whatsoever. It’s just referencing, so stuff does not break tomorrow when you touch it and you’re stuck again. Consider it.