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"

whats the deferent between gamestate and game instance

whats the deferent between gamestate and gameinstance what we should use for multiplayer UI (UMG) cuz i see some use the gamestate and some use gameinstance

Product Version: Not Selected
Tags:
more ▼

asked Mar 10 '15 at 08:44 PM in Blueprint Scripting

avatar image

MuhammadMadi
70 12 16 20

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

2 answers: sort voted first

GameState is replicated extension of GameMode, since GameMode it self is not replicated and exists only on servers memory for security reasons. So GameState let clients access some game data which you would normally place in GameMode, primerly scores and match time, stuff that you usually see on scoreboard. This is only info that client will have and GameMode should have info which only server should know. You can ignore GameState if you creating single player only game.

GameInstance is a class that which state persists switching of levels, game mode switches etc. where classes like GameMode or PlayerController are being reset and any data stored in them is deleted and put to defaults again. Any data that you want to keep beyond levels and matches, for example "what player did in specific moment so you can have consequence on other level" should be placed here. This class is mainly helpful for single player games... but it can find uses in multi player too ;] I not sure if that class is replicated

For UI of multiplayer game you should use GameState and PlayerState ofcorse

more ▼

answered Mar 10 '15 at 09:10 PM

avatar image

Shadowriver
34.6k 917 164 1094

avatar image MuhammadMadi Mar 11 '15 at 02:29 PM

nice explanation it help if u have any link to document or video to have more understanding itll be helpfull

avatar image Shadowriver Mar 11 '15 at 03:33 PM
(comments are locked)
10|2000 characters needed characters left

" I not sure if that class is replicated"

does it exists on server side and client side both?

more ▼

answered Aug 10 '16 at 05:47 PM

avatar image

Muzaheed
235 18 24 31

avatar image a.cartellone Aug 31 '16 at 12:18 PM

I did a quick test and it looks like both client and server each have their own separate GameInstance.

avatar image Enlo Oct 11 '16 at 08:42 AM

This is actually logical, since the GameInstance is your personal user storage. So it keeps your data (e.g. game settings) even when you change from one multiplayer server to an other.

avatar image WDR_Darx Jul 27 '18 at 07:02 PM

then how can you access a specific game instance of a player controller through a game mode

(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