- Home /
How to draw lines/images on 4.6 uGUI Image for a scrollable map?
Hi,
I have a proceduraly generated world. I create the towns, roads, etc at run time.. So I start with a blank map like so:
And I want to draw on it like so: (From my windows forms prototype which allows me to get a Bitmap.Graphics handle and draw lines, shapes, etc.)
In my 2d unity game the map is huge and requires scrolling. I therefore put the map into a 4.6 ugui Panel with a scrollable rect which the user can then scroll around in. The scroll rect is masked, so I need whatever I draw to be masked by the same masking. I believe this scrolling/masking requirement means I have to draw directly to the uGUI Image (Texture) as opposed to drawing on top of it, so everything appears where it should as the user scrolls.
What is the best way to achieve my map drawing requirements?
Your answer
![](https://koobas.hobune.stream/wayback/20220613184150im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
[4.6] How can I make children images not stretch with the parents? where to place anchors? 1 Answer
4.6 UI Image Color.Lerp 0 Answers
Sprite.Create looks compressed 1 Answer
Remove Focus From InputField 2 Answers
Dropdown box scrollable 4.6 0 Answers