- Home /
Design Question/Moved to the Forum
The best way to draw grid on terrain in editor mode
Hi all. I'm trying to create custom editor for map logic to display passable, not passable, partially passable and so on grid cells. Grid cells should be painted in different colors to indicate passability (e.g. not passable water or lava colored in red). I tried to create custom editor which will draw grid in OnSceneGUI() method but it works fine when grid size is not large, 10X10, for example.
But when I set grid size to somewhat like 256X256 Unity editor just hangs and not responding anymore. So drawing large number of lines in editor seems to be very expensive in terms of performance. Another way could be generating a semi-transparent mesh with generated texture but it should be unselectable (it is just for displaying stuff and not for manipulating) and, if possible, not displayed in Hierarchy. But I don't know how to create such Mesh as it seems required GameObject which will be selectable in editor and will hinder me from editing terrain. Does anyone knows how to properly paint such terrain 'sattellite' grid (or, probably, panit it exactly on terrain object) in editor? Thanks in advance.
This sounds more like a design problem with multiple technical issues. UA is designed for single, specific questions. Unity forums might be a better place to ask this question.
Here is one link that might help you a bit:
http://answers.unity3d.com/questions/442581/how-to-draw-a-grid-over-parts-of-the-terrain.html
Thank you for your suggestion. Will post this in forums. If someone of moderators will see this question please delete it.
Follow this Question
Related Questions
Paint Grid Texture 1 Answer
How to find a circle (radius) in grid tiles around another tile 1 Answer
Allign grid with Splatmap 0 Answers
Allign grid with Splatmap 0 Answers
Mesh deformation by terrain shape 0 Answers