Blueprint struct array only returning first element ([0]) while other get nulled. As if it wasn't even an array.

When creating a struct array in blueprints and setting elements in the values, the values other then element 0 will be deleted. The engine will act like the datatype isn’t even an array. Simple test shown below. Index [0] will have the status name but index [1] and [2] are deleted. The length also reads as 1 and not 3. Blueprint structs has always been buggy and need be fixed. They don’t work correctly when nested in a datatable and/or in arrays.

Now there is another bug. When I deleted all the elements, the struct still contains the index [0] even though it has been deleted by the picture shown below. I manually add new elements to the array as shown as (StatusName : index). However, there is a 4th element printed out called poison. Poison was the original name of index 0. As seen, this no longer exists and I have recompiled multiple times to try and get rid of it. It still persists.

I know how to clear arrays and set data up from a table. However, that is not the point of this report.

Hello mavendigital,

I ran a few tests on our end, however I was unable to reproduce the issue that you have described above. I have a few questions for you that will help narrow down what issue it is that you are experiencing.

Quick questions:

  1. Can you reproduce this issue in a clean project?
  2. If so, could you provide a detailed list of steps to reproduce this issue on our end?
  3. Could you provide screen shots of any structs/blueprints/settings that may be involved with this issue?

I have not had this bug reoccur since and can no longer reproduce it since engine restart. However, I did make a clean project and complied a struct with out it being an array and then converted to it to an array and had to recompile 3 times before it actually showed it as an array. To fix my original problem. I had to delete the datatype and create a new one. It seemed to have fixed it.

One thing to note and always seems to created problems is a nested struct in a struct, especially when it’s an array. Sometimes the struct will get a compile error and you have to delete the nested struct and add it again. Also you can not use .csv files for nested blueprint structs. JSON works fines, though.

Thank you for the additional information. I am happy to hear that your issue is no longer occurring. I will be accepting your last comment as an answer. However, if the issue returns please feel free to reopen this issue with any additional information that you may have on reproducing this issue and we will be happy to help.

Make it a great day