hello,
how to use nested array?
I need structure:
StaticMeshName
- Transform
StaticMeshName
- Transform
Now I have 2 StaticMeshName but transform is not nested for each one.
hello,
how to use nested array?
I need structure:
StaticMeshName
StaticMeshName
Now I have 2 StaticMeshName but transform is not nested for each one.
You can create a struct of type:
Static Mesh Name (static mesh)
ot an array
Transform (transform)
Let’s call this Struct_SMData.
Then create another struct containing two variables (or a single array if the number of static meshes can vary) of type Struct_SMData. Now when you create an array of this second struct type in your blueprint, each element would be a collection of the first type i.e. Static Mesh Name + Transform combo.
In unreal BP you can’t have multidimensional arrays (they really need to add that in!) As such, the best alternate approaches is to use the Map type if you need to control an Index and a Variable. Or a reference and an array…
The variable of the map can then be another array or a struct.
Thanks very much for your help but still i’m not able to understand. Can you give me any example?
I need to add in Add static mesh component from array first need to find what name is StaticMeshName then I need to find Transform for each static mesh. For this I need to use For Each Loop.
Approciate for your help in advance.
I have tried like this but cannot found integer=1, integer=0 works, if I added another integer not works.
For the nested arrays i think i might have an answer.
So first make a structure that contains the type of array you want.
Then make a map with this struc
Then you can edit it this way.
Ignore the save and load data stuff. Just remember you have to both add or set members for the struct. Then for the map you have to find then add…or else you’ll get a copy and it won’t update the arrays.
Oh and you can add more to these specific nested arrays manually if you want like this
(this is a separate example from the one i just showed)
Hope this helps!