x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

UMG - Issues with UI being created for Clients (Level BP vs GameMode BP)

Hello.

So for the past week or so, I've been trying to figure out the best way to create and display my UI for multiplayer. At first, I tried using just the Game Instance, and while that works for single player, it didn't seem to work for me for Multiplayer.

I found that in a multiplayer session, each player is assigned their own unique Player Controller, which seems to be persistent between levels (?), so I made all of my UI in a custom Player Controller blueprint. There is a function that creates all the widgets I may need, and another function that displays whichever one I say.

My goal was to call these functions from my custom GameMode blueprint, as that's where the rules are, and I thought where I should determine which UI to initialize for each player. After way too much time, I realized that it just doesn't work (for clients) in the GameMode type blueprint (or I'm doing something wrong).

I tried the Level Blueprint, and my code worked fine. It's nice to have figured out a solution, but it isn't ideal. I made a GameMode for racing: Racing_GameMode, for example. Whenever I want to do X things specifically for a certain mode, I assumed I should be doing most of it in the GameMode blueprint. This way, I don't have to make this code over and over for each level, I can just assign the GameMode and be done.

The code is attached. It works in Level Blueprint, but only for Server in GameMode. I've tried everything I can think of but nothing will display for the Client. Am I doing something wrong or am I not fully understanding how each type of BP works?

alt text

Product Version: Not Selected
Tags:
more ▼

asked May 05 '15 at 11:19 PM in Blueprint Scripting

avatar image

Maverinox
209 12 11 24

avatar image Maverinox May 06 '15 at 04:39 PM

anyone?

tl;dr version - What's the best way to handle UI from level to level in networking

(comments are locked)
10|2000 characters needed characters left

1 answer: sort voted first

it would seem the game mode begin play doesn't run on your client (or at least it doesn't while in play-in-editor)

I've always done my umg stuff in my controller for multiplayer, this however creates a period of time where I can't have a umg UI while my player is connecting - this is what brought me to this post.

more ▼

answered Sep 29 '16 at 03:40 PM

avatar image

BPANDREW
995 22 26 124

(comments are locked)
10|2000 characters needed characters left
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question