Description

Struct array variables interpret multiple Structs as the same if they have the same values. This does not occur if the values in the Structs added to the array are different.

Test project in 4.8.1 attached.

Reproduced in 4.7.6, 4.8.1, and Main (//depot/UE4/Promotable-CL-2610743)

Steps to Reproduce

1. Open a new project
2. Create a new Struct, StructBP
3. Create a new Actor Blueprint
4. Add a new StructBP variable, Struct0
5. Add a second new Struct variable, Struct1
6. Make StructBP > Set Struct0 (leave the default bool value as False)
7. Make StructBP > Set Struct1 (leave the default bool value as False)
8. Add a new StructBP Array variable, StructArray1
9. Get StructArray1 > Add Unique > Struct0
10. Get StructArray1 > Add Unique > Struct1
11. Get StructArray1 > Length > Print String
12. Attach all to Event Begin Play
13. Drop the Actor BP in the level
14. PIE

Result:
Print String: "1". Looks like only one of the two Struct variables are added to the Struct Array variable because they both have the same values. This does not occur if the values in the Make Struct node are different.

Expected:
Print String: "2"

Have Comments or More Details?

Head over to the existing Questions & Answers thread and let us know what's up.

0
Login to Vote

By Design
ComponentUE - Gameplay - Blueprint
Affects Versions4.7.64.8.14.94.14
CreatedJul 7, 2015
ResolvedJul 7, 2017
UpdatedJul 10, 2017