Moving objects to a stack in the editor (before run time)

Hi, I’m looking for advice on a quick script to make my “level design” for my puzzle game a bit easier. I have a set of hexagons I want to put into a stack - named Hex1 - Hex15. I would like to run a script to target them to the X and Z position of a certain game object and iterate their Y value from 0 by 0.66 each hex. (ie Hex1 would be at y=0 and Hex15 would be at 9.24).

I’m hoping something within the script can use a string to identify them by name “Hex” and take the # after it and do something like (0.66*#) - 0.66. I know the math I’m just learning the scripting part =/

For game reasons I don’t want to parent these hexes to the targeted game object as I’m going to have multiple stacks and want them all to have the same parent.

I’ve seen scripts before that execute when hitting play and when the game is stopped their effects are still present in the editor (for things like moving objects) but I haven’t come across something like this. If I missed it in searching I apologize.

Thanks!

For scripts that take effect at design time, you want editor scripts. This should help get you started.