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"

Saving the whole GameInstance

Hello,

is it possible to save the whole GameInstance at once? At the moment I save the instance variables into GameSave variables and then save them in the savegameslot. This is quite tedious... Thank you very much for your help

Product Version: UE 4.19
Tags:
more ▼

asked Feb 21 '19 at 11:13 AM in Blueprint Scripting

avatar image

HeroDave
5 1 2 2

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

3 answers: sort voted first

Create a struct(s) or arrays of structs - this will allow you to save many variables at once.

more ▼

answered Feb 21 '19 at 01:20 PM

avatar image

Everynone
12.1k 71 24 49

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

In each of your game objects your would like saved create a script that defines what and how to save its data. Then when you call the "save game" command have it use an event dispatcher that informs each of your game objects to save its data. It is still a lot of manual coding but I don't know any way around that, the computer isn't going to save your game for you, you need to specify exactly what should and shouldn't be saved, which means going through things one at a time. But with an event dispatcher you can create the code once in each object class and then the process will be automated.

more ▼

answered Feb 21 '19 at 02:03 PM

avatar image

Nebula Games Inc
4k 24 9 14

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

Thanks a lot both of you! I'm solving the problem now with structures. I thought, because the GameInstance variables persist the level changes and they must be stored somewhere... so that you could save the GameInstance as a whole.

Greetings from Switzerland HeroDave

more ▼

answered Feb 22 '19 at 01:40 PM

avatar image

HeroDave
5 1 2 2

(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