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 structure in blueprint?

Hello, I've created a blueprint struct with various game data variables. Below shows a number of facial setups for characters.

alt text

I then made a scene with on screen buttons and sliders so we can visually edit those game variables while seeing the characters faces.

My problem: I can't figure out how to save the modded variables back to the structure? I don't want to use save games, because it's just internal data used for the game. So how can I make the modded data actually get saved back to the blueprint structure above (so if you were to look at that structure, you'd see the changed data)?


Product Version: UE 4.9
more ▼

asked Oct 02 '15 at 03:45 PM in Blueprint Scripting

avatar image

152 38 37 45

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

2 answers: sort voted first

Long story short, you can't, using only blueprints, with the supplied nodes from Epic. There are many reasons for this, but the main one is, there is no way to "write" back to disk.

A structure should be thought of, well, as exactly what it is, a structure, just a set of data that one can group together with a name (i.e. the name of the structure), it's nothing more nor less, and as it appears to be "typed" differently than the rest of the system (i.e. try casting that structure to something else, so it appears to be a "object type" that has no parent). As there is no inherent abilities to write to disk (assuming "disk" analytics would work, then a way could be cobbled together, but so far, I've only got error messages from that, as the Editor cannot find some DLL's at startup), then the structure, is just a variable with no parent, and cannot be used to write to disk.

If you roll your own C++ code, then you could create a "node" for blueprints in order to have this functionality. Also you may wish to check Rama's free library here in the Wiki to see if it has that.

Hope this helps,



more ▼

answered Oct 02 '15 at 06:48 PM

avatar image

1.4k 41 28 56

avatar image Juice-Tin Oct 02 '15 at 07:17 PM

I just find it strange that you can easily read a user generated struct but can't write back to it.

I'm cool with a c++ node, but I'd have no where to begin, as it automatically reads your struct data from the variable (there's no node needed to read it), so there's no 'load struct' node I can look at for reference.

Rama has nothing of the sort. Maybe I can just use my editor to display the values, then enter them manually into the struct.

It's a shame, as this functionality is Perfect for making in-engine editors for internal use.

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

You can do that just fine and pretty easily. All you have to do is get the struct and set members in it and done.

Like this:

alt text

To select which members of the struct you want to change, just click on the "set members..." node and on the left side in it's detail pannel you will be able to select the pins of the variables you want to expose as input. Then you just plug your new variable in it and it will save it to the struct without losing any other variables that are already in the struct.

What this node basically does is internally transfer all the data from the struct to a new version of it except for the variables you changed, those are then integrated into the "newly" formed struct and thus using this node you are able to push updates to a struct very easily.

In our project we use this fo all our customisation and saving, including game options. Everything is updated on the go, exactly the way you want.

more ▼

answered Nov 30 '17 at 02:01 PM

avatar image

86 2 13 14

avatar image Jackiefrost Dec 21 '18 at 05:41 AM

I didn't see this, but I'm grateful I just found it. It's amazing and works just fine. Thanks for this!

(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