stephensamonte / Unreal-Virtual-University

Learning Unreal Engine by creating a game that takes place at VT
1 stars 0 forks source link

Blueprint Multiplayer: Main Menu Setup | 05 | v4.11 Tutorial Series | Unreal Engine #27

Closed stephensamonte closed 4 years ago

stephensamonte commented 5 years ago

Blueprint Multiplayer: Main Menu Setup | 05 | v4.11 Tutorial Series | Unreal Engine https://www.youtube.com/watch?v=fTadMplBzqA&list=PLZlv_N0_O1gYqSlbGQVKsRg6fpxWndZqZ&index=5

stephensamonte commented 5 years ago

Summary:

stephensamonte commented 5 years ago

@EmSwain 7:30 show game menu was not compatible with a game info instance.

So, I casted a game instance to a game info instance (casting means reading some object as another type of object). This created errors image

This should be find because it was done in the previous video to show the main menu by default. But, it wasn't fine. This actually created Errors in this context. https://youtu.be/78XJYBfWXAA?t=1581

stephensamonte commented 5 years ago

This was one of the comments on the video: "If your menu don't show, other solution: Edit>Project Settings>Maps and Mods>Game Instance -> Sent to GameInfoInstance" image ^ This was already set correctly.

stephensamonte commented 5 years ago

This was one of the comments on the video: "(WORKS 2018) For who that still has the problem with the menu that doesn't show up, if you look at the Output log you should see an error saying: mixing AGameState with AGamemodeBase is not compatible......... I went back to the videos and I realized that when he creates the blueprint GameMode called "GameplayGM", he is actually creating a GameMode but if you are using an updated version (i am using Unreal 4.18) you will see that when you are in the menu to create the bluprint, is actually a GameModeBase... so in the project settings ->game modes you have to change GameState to GameStateBase or change re-create another blueprint "GameplayGM" of the class GameMode instead" image

^ The above did not work also because we're using a newer version of Unreal 4.22.2

stephensamonte commented 5 years ago

I could not find a functional answer online. Playing around the below compiles without any errors. image

The function "get game instance" returns the instance of the UI that the user is currently on. It's then cast to a "game info instance" with the output replaced with the "remove from parent." I don't know why, but no errors exist when I compile.

I cannot tell if this works because it requires completing the following videos to test the actions.

stephensamonte commented 4 years ago

We made a mistake following the tutorial.

I now have a better understanding of how things work. We couldn't find the variable because we failed to promote it to a variable. SILLY US.

image

stephensamonte commented 4 years ago

I updated main menu blueprints to use this variable.