GroundRefresh.component
README.md
GroundRefresh
Makes sure the ground of the Terrain on its own entity stands as it was baked once play starts, on every screen. It rebuilds the ground after 1 second and after 5 seconds (delays), then checks the landscape's height field every second for two minutes (watchSeconds) and rebuilds it again, at most once every 3 seconds, whenever it is far flatter than the bake says.
On the current engine, a baked landscape (a terrainData) can build its ground mesh before its height data has arrived. The ground then lies flat and unpainted until something rebuilds it, so the whole map reads grey. On a cold start that data can arrive later than any fixed delay, which is why it keeps checking. Rebuilding once the data is there puts the ground back as it was baked.
Attach it to the entity that carries the Terrain component. It needs nothing else. rtsKit.maps.riverCrossing adds it to its landscape; add it to your own baked landscape the same way:
landscape.component.add("rtsKit.GroundRefresh")