- Home /
Design question/multiple technical questions
Displaying a map in the editor window
Hello All,
So Here is my question: Assuming that in a given editor window, I want to display something like a world map. Perhaps I want to have a way to interact with for example an RPG world, but that's beside the point. This world map is split up into selectable regions (this way I can select a region, and click a button to have something happen to the region). this region can be a complex path or a uniform grid.
I am asking 1) how to get a map image rendered in the editor view mode and 2) create selectable regions (think of the green selectable regions when defining a mecanim avatar) that when selected, can be used in future processing, such as when the user clicks a button to create a new event in that region of the world.
I imagine that the map rendering is trivial, as there is the drawpreviewimage of the editor gui class, but overlaying it with selectable regions is the tough part. I dont know if there is an extensible way to add onto the map rendering the way I have it described. I am also sure that the selectable region has to be some sort of special editor class that provides its name, a boolean for if it has been selected or not, and contains a reference to it that can be used when needed for further processing.
Any input on the matter would be much appreciated. Thanks
Unity Answers is for single specific technical questions. We ask that design questions be asked on Unity Forums. As you figure out your design and begin to struggle with new issues, we welcome your specific questions.