You are trying to draw some kind of grid, right?
There are a lot of problems in your script:
1. Drawing API is not designed for this purpose.
It is much better to use overlay here, or to limit the drawing area by viewing area.
2. You will have a different distance between the horizontal lines, and they will not be horizontal at all.
I do not know, maybe so planned, but it looks suspicious.
3. For zoom >= 16, you have 7200 drawing elements, which is a lot.
4. Your code does not work as expected, because "i" will never be equal to 180.
https://www.extremeoptimization.com/res … rmats.aspx
This means that every Update you create new lines.
5. GameObject.Destroy (GameObject.Find ("Drawings"));
By destroying this GameObject you do nothing, because the map will create it again with the lines that were added earlier.
Use OnlineMaps.RemoveDrawingElement or OnlineMaps.RemoveAllDrawingElements.
P.S. This is just a quick look at your script. Perhaps this has more problems.
Infinity Code Team.
Do not know the best way to thank the developer? Rate the asset in Asset Store!