Hi, I’m making a city builder game and I’m having problems with my grid system. I’m trying to enable each grid slot individually rather than having the whole grid enabled from the start. I run a for each loop to enable all the grid slots and I can interact with the grid but when I try to individually enable one slot I cant interact with the grid.
yeah your right I had a print string which showed me which grid point it is getting from the array then I hovered over the grid point in the world and it wasn’t the same one why is that happening?
And I chose to do my grid as a widget mainly because I just did a UI course at my university and feel pretty confident in it haha, also taking the city skylines grid as my main inspiration which looks like its UI.
It isn’t completely UI based as the widget is still attached to an actor so hopefully it wouldn’t be too hard to reformat if needed.
I did create the grid generation using a YouTube tutorial as I spent too much time trying to figure it out myself and needed to move on so I don’t really understand how it works if I’m being honest but ill attach images of it below.
I replaced my current script with that macro, wish I knew about it from the start thanks for showing me it though.
But I’m still having the same problem, the right amount of grid points are spawning but for some reason the grid point which it says it spawned isn’t the same one that is actually visible. It says its spawning grid point_0 but when I hover over it in game it comes up as grid point_2 and I can’t interact with it.
Edit: when I say spawning grid point 0 I mean just setting it visible as I’m spawning all of them but only trying to make the first one visible