At the end of the 5 tutorial (05 - Main Menu Setup), the menu is suppose to show but nothing happen.
I try many thing’s. I can display the menu from the level Bleuprint but not from the GameInfoInstance.
The ShowMainMenu event is fire in the GameInfoInstance and everything is exectuted to the end ( I added a PrintString at the end to see if everything is executed to the end , and it isd).
My conclusion is that the AddToViewport is not working in the GameInfoInstance because the GameInfoInstance dos not acces a valid Viewport???
Here is a screen shot of my
Thank’s you found the problem…
In C++ it’s never happen to me…but in BluePrint it’s a little bit different…
The resaon why IsValid is there is because we want to create the widget just one time. The ShowMain menu is tied to EventTick in the BluePrint Level, not to EventPlayBegin… well that’s the explanation I found to understand why the guy in the video tutorial has done that…
No worries . Spelling mistakes in programming can be a nightmare always hard to spot and can cause so many bugs lol
As for the valid node it is correct my brain wasn’t working when I made that comment.
The first time it executes the node will return invalid and then create the widget but any time after that un till the widget is destroyed it will return valid and so skip the other code . Similar to a branch