So… I keep on trying to get the Fade Out animation for the Background Widget to work, but I’m always ending up with:
Blueprint Runtime Error: “Accessed None trying to read property BP_UI_MAIN_MENU_BG”. Node: UI MAIN MENU BG PLAY ANIM FADE OUT EFFECT Graph: EventGraph Function: Execute Ubergraph BP UI MAIN MENU Blueprint: BP_UI_MAIN_MENU
So the animation itself doesn’t have a target. You want to change the GetAllActorsOfClass to GetAllWidgetsOfClass, take that array on the end and use a ForEach on it, so you can get a single object (or all objects one at a time), then on the output of the forEach hook THAT into the UI MAIN MENU BG PLAY ANIM FADE OUT EFFECT there as the target.
Since your BP UI MAIN MENU BG has this set up correctly (I believe), this should solve your issue. Let us know how it goes!
Edit: I erroneously suggested keeping GetAllActorsOfClass, when it should be GetAllWidgetsOfClass, so I fixed
You use a ForEach loop to break up an array. Useful if you have to use something to grab multiple things, sure but this way you can only grab one thing as well. TRY not to use it during real gameplay though, as it can be processing intensive (on the main menu it’s pretty safe unless your main menu is absolutely Captain Insane-o ).
Couldn’t reply yesterday, had net and power outage.
But it works, at last. The Fade Out Animation’s now playing just fine and there’s no errors.
Besides the Note in Cast To:
I also don’t know why, but somehow I couldn’t find the For Each Loop node in the Widget Blueprint until I copied and pasted it from the Player Blueprint to this Widget Blueprint.