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 with "object" type array not working?

Hi,

I'm trying to implement saving and loading my inventory and equipped items. My entire inventory system is based upon a array of "object" type which contains the ItemTemplate items.

Now I'm trying to save and load this array of "object" type, the save seems to be working, but when I try to load it back in in my controller, the saved array i'm trying to load is empty and I have no clue why.

See screenshots for some of my save/load code.

the strange thing is, however, that i'm doing exactly the same thing with a array of "Texture2D" type and that is working perfectly.

Any clue why it is not working with an array of "object" type?

alt text

alt text

Product Version: UE 4.13
Tags:
save.png (356.2 kB)
load.png (200.0 kB)
more ▼

asked Dec 14 '16 at 02:15 PM in Blueprint Scripting

avatar image

Rebel Camp Games
20 4 7 11

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

1 answer: sort voted first

So saving objects is not possible. I found a solution to my problem though.

I saved my data with a Item_Struct that holds all of the item's information. Then on load, I spawn my items with "Spawn actor from class" node and fill in the information the item needs from the loaded Item_Struct.

more ▼

answered Dec 15 '16 at 02:40 PM

avatar image

Rebel Camp Games
20 4 7 11

(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