Scene Component doesn't update array values

Okay thanks for the project and detailed images, it helps us understand the problem better.

  1. Dictionary has a set of meshes and an integer value, that denotes how many times it would spawn. For example Cube has 5 means it will spawn 5 cubes.?
  2. Now you tried to set the values in compile time as default values and it is not working?
  3. I think if you put a break point in the second image when you iterate through the dictionary, is the dictionary still having all the values? Did you set the values in the component after you attached it to the actor in the actor BP ?
  4. Have you tried passing in the dictionary by reference to the Spawner function?

If you still can’t get it to work.

Solution1:

  1. Create a struct ‘Couple’ that has “Keys and Values”, Cube | 5
  2. Create a Data table with those structs, say for Level 1, You create a Level1Datatable that has all the info you need, Cube 5, Sphere 6, Cylinder 8
  3. In the level blueprint, read those values from the data table and spawn them.

Solution2:

  1. If you still want this as a component that you can just attach as a plug and play, you can still write logic in the component to read the value from the data table and spawn them accordingly, that way its more pluggable across different games.

Also I dont have 4.19, if you have a 4.18 project I would probably find the solution.