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"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

Game Instance For Multiplayer?

I am making a multiplayer game, using multiple tutorials and threads for reference to help get me started. All of these seem to do anything server related in the game instance blueprint (ex:server travel, start/destroy session, etc). Is it needed for this to be in the game instance? Can I do it directly in the widget blueprint when you click the designated button? I am using the steam subsystem. Thanks!

Product Version: UE 4.21
more ▼

asked Mar 15 '19 at 07:59 PM in Blueprint Scripting

avatar image

51 7 8 11

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

There no "need", but this is common practice, as people want to keep session information on persistent object that don't get destroyed together with the map on map change and game instance is most common persistent class that is accessible and usable in blueprints only projects. UE4 is more set up for game with match cycle with beginning and end, so all actor class (including GameMode and PlayerController) get destroyed on map change and level restart, to keep them on clean state at new map start and make matches set up a lot easier. Without that you would need to create reset code for each game implementation, practically for every class, with this you don't really need to care about it everything starts anew. So to keep any data out of that cycle you forced to use Game Instance.

But for example Server Travel should be usable else where on server side, as server will perform action regardless if object calling it will get destroy in process, same as level restart and normal level switching. But UI runs on client, so you will need to send call to server to preform that action anyway, but this could be gamemode as well.

more ▼

answered Mar 15 '19 at 08:20 PM

avatar image

36.6k 931 169 1111

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
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