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"

Save/Load Object Instance to/from Slot

Hello,

Is it possible to save dynamically created objects?
Currently, it seems that only a reference is stored. Are we limited to saving plain variables in blueprints?

This works like a charm: alt text

This does not, even though the saved data exists: alt text

alt text

Product Version: Not Selected
Tags:
saving.jpg (316.7 kB)
nosaving.jpg (312.4 kB)
outputlog.jpg (122.9 kB)
more ▼

asked Nov 20 '14 at 10:48 PM in Blueprint Scripting

avatar image

Everynone
15.2k 77 25 62

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

2 answers: sort voted first

Hey Everynone-

The reason the second blueprint isn't working is because the "Set Object to Save/Target" node and the "Save Game to Slot" node are never actually called. The variables being passed to the Save node are set properly but the save never actually happens. Since you are working with a dynamically created object, you could save the values for the object and then recreate it (which it seems you may be doing in the first screenshot) rather than save the object itself. Hope this information helps.

Cheers

Doug Wilson

more ▼

answered Jan 30 '15 at 08:47 PM

avatar image dzeligman Jan 30 '15 at 09:07 PM
avatar image Everynone Jan 31 '15 at 12:31 AM

Hello,

Your confirmation does help. I came to this very conclusion several days after posting the question and I've been saving struct arrays since then, re-spawning the objects on run-time.

The bottom line is: the object itself is not really saved, just its reference. As soon as the object is removed from the memory, the pointer returns... well. I hope I got it right.

Thanks

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

You will need to spawn and initialize any dynamic objects that are not serialized to the level.

So what you can do is make a struct that stores the Object's Class, Name and Transform. Than when you load it back in you can spawn it at the transform location and orientation with its old name using the class type.

more ▼

answered Jan 29 '15 at 04:29 AM

avatar image

dzeligman
713 32 30 56

(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