I’m trying to create a system that changes location (Pick up) when clicked with the mouse, but if the material is the same it has to pick up all of the same material in that specific line of boxes/cubes
I first create multiple static meshes with component tag to know which Index of the array I clicked on and set the material from an array of materials that I select on the Scene then save each component into an array
I’m sure that I’m doing everything right
You can check the Screenshot from Blueprints to understand what I’m trying to do better
I dont know if my method can be done better but this is all I could thing about
My problem is that I get this Error
and also when I click on the last box/cube it picks up the first index of array for some reason
The Materials Variable is a Structure that contains Material Interface Array
MershesArray Variable is a Struct that contains Static Mesh Component Array
Hope you can help me out on this issue that makes no sense to me