Let me explain what I exactly want to achieve
I have a map :
Each square is a sprite. Well in the editor it's from a tilemap object because it's easier to draw large area with this.
When the layout is created, all the tiles are replaced by a block sprite. But that doesn't matter for my issue I guess.
So i have a level with a lot of squares and I would like to automatically have slopes on edges, like this :
And the blocks need to be sprites because I need to do some actions on them (change opacity and stuff) for other events.
I don't really care if it takes a few seconds to iterate over all my blocks to set up the slopes on edges because it will be done only once when the layout is created.
However, it will be done in smaller areas some time when a game occurs, because the blocks are destructibles. New edges will be created by the players so I'll need to change some blocks to slopes, but this is another issue at this time.
I'm currently trying using an array to do the work but I'm not done finishing yet so I don't know if it will be faster than the previous method.
I don't know if I explain well my issue
Edit : How dumb I am. I just have to do this while I'm on my big loop at the start of layout, I can check the tiles positions for each loop index.