Attachments are superbugged and I can't seem to post my project file.
So recently I have been trying to make a very simple tilemap based terrain checker, that goes through all the tiles and makes them have slopes and blends and things. This is the second try. This time I'm using am array to store the actual tile locations and make changes, and the tilemap is only there as a collision mesh and to look good. Hopefully.
For some reason, the fact that I have two material types (stone as 0 and grass as 1) screws it over somehow, and I have no idea how. The effect is that every time the system checks a grass tile, it converts it to a stone tile. Or in other words, as shown by the sprite text object says, (tells which material ID is under the cursor) there are no instances of the grass material, even though I put them there in the tilemap.
The issue I believe is somewhere in here:
To explain the system I have in place, the tilemap sprite is set up to have 20 tiles each row, so I can just pick say, tile 20 and it will be the 2nd type of terrain, and will be a 1 in the "tilelist" array (zero based).
I probably should have done it the other way and had 1 through 20 as materials with 21+ being versions of those materals, but that shouldn't really matter too much here.
If you have any ideas I would love to hear them.
Fixed; I redid the tilemap so that it was based of 1 through 20 rather than 0,20,40,60 etc. and it seemed to work fine after that. Must have been a math problem, like rounding errors.