I use the built in terrain engine in my game and have implemented basic digging which works very well for me.
Isuue is when i decided to add grass to my terrain, now its really slow do dig even if i only modify a single terrain point like this (part of code):
float[,] height = new float[1,1];
terrain.terrainData.SetHeights(posX, posY, height);
This makes the whole game lag for around 1 sec or more (hard to tell) which i find very strange considering the small amount of terrain i modify.
Without the grass it goes pretty much instant, why is it so slow?