So I just moved all of that into the construction script and here it works as I initially wanted it: Run this beast, take whatever time you need but just run it.
So its
- Creates the Grid (128x128) and saves each grid point and each grid point location into Arrays (0,3 sec compile time)
- Calculate and set grid tiles to “Edge of the map” (not yet in use, maybe useful later on) (still 0,3 sec)
- Create Noise and set grid tiles accordingly to Water/Land Arrays (compile time now 0,67 sec)
- Scann the map to find all Water tiles that are Ocean, remove them from Water array (now 7,6 sec)
- Create all the instanced meshes from the Water/Land/Ocean/MapEdge Arrays. (now 8,7 sec)
All of this in 8,7 Seconds. I dont know if its bad or good since I have no comparison. But the scann is abviously the big oof
But your inward ring sounds like an improvement already. Yesterday I tried to start with the bottom left corner so I only need up and right. But it lead to some holes where the coastline is very curvy. I will try yours as well
BR
Sven