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"

Can't set array elements in structure array [Demo project]

Setup: Array of structures "StructureA". In StructureA, array of integers/strings/whatever. Result: Can't set any element in integer/string/etc array.

I've attached demo project. From simple BP setup, it will print string showing that values 1,2 and 3 are added to integer array, but then, when trying to read these values, it will just print "0". Same goes for array of Strings, where it will read just a blank field instead of added string values. SIMPLE DEMO PROJECT

PS. This bug is probably related to THIS ONE.

Edit: Updated product version, it still happens in 4.9.

Product Version: UE 4.9
Tags:
more ▼

asked Aug 26 '15 at 02:21 PM in Bug Reports

avatar image

Slavq
2k 158 154 210

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

1 answer: sort voted first

Hi Slavq,

Thank you for the report and the attached project, I was easily able to reproduce the issue. I created JIRA UE-20424 for the issue and our developers will be investigating it further. We will post here with updates as well have them.

Cheers, TJ

more ▼

answered Aug 26 '15 at 04:47 PM

avatar image

TJ V ♦♦ STAFF
41k 1009 183 494

avatar image Slavq Oct 12 '15 at 02:03 PM

Hello, any news on this one? Will it make into 4.10? This bug prevents me from finishing my save/load system.

avatar image TJ V ♦♦ STAFF Oct 12 '15 at 04:47 PM

Hi Slavq,

This has been put on the to do list by the developers but it will very likely not be fixed by the time 4.10 is released.

As a workaround, try resetting the struct array at the end with the one that you added to.

avatar image NightHawk45 Oct 18 '15 at 04:24 AM

Can you please elaborate on your workaround? I believe I'm running into this same issue with my inventory system (Character has array of clothing structures, clothing structure has array of items).

I can't seem to figure out any way to work around this, and its really causing me a headache.

Thanks in advance!

avatar image TJ V ♦♦ STAFF Oct 22 '15 at 08:13 PM

Hi NightHawk45,

This was a workaround described to me by the devs. I hadn't had time to try it but I just did and it doesn't workaround the issue like we hoped. We will be investigating this issue but for now it doesn't seem this exact setup with Struct Arrays is the way to go on this.

avatar image Slavq Dec 14 '15 at 04:26 PM

Is there any news about this bug? It's been a couple of months now and I can't figure out any workaround.

avatar image TJ V ♦♦ STAFF Dec 14 '15 at 06:55 PM

Hi Slavq,

We are planning an overhaul of structs and arrays that will most likely fix this issue. We hope to have more news on this in a future update, however we do not currently have a timetable.

avatar image Slavq Apr 10 '16 at 10:43 PM

Couple of months have passed, 4.11 is out, but I guess that the struct & array overhaul is not there yet?

avatar image TJ V ♦♦ STAFF Apr 11 '16 at 08:41 PM

Hi Slavq,

Internally, yes. This particular issue has been fixed but it didn't make it in the 4.11 release.

avatar image Willard720 Dec 23 '16 at 08:29 AM

Its 4.14 now, but I still have this bug.

avatar image vb4 Dec 27 '16 at 04:47 PM

Do you know if it would be possible to work around this by using C++? Or is TArray also bugged in this fashion?

avatar image Slavq Jan 21 '17 at 01:48 PM

Indeed, in 4.14 the bug still exists... It can be reproduced in the same attached demo project, just like before.

avatar image Freestyledork Jan 21 '17 at 08:45 PM

I can confirm I just discovered a similar issue related to nested Structs. I created a Struct with a bunch of values related to my buildings. Then created another Struct to created a list of edited values for different building types. Seems to work in the PIE but trying to use it in standalone it never reads the stored values in the Struct. If I close and open the editor the Structs and BP that reference the Structs get all messed up. Really annoying on a seemingly core function.

(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