Is it possible to us this script with alpha channels? I need lines drawn over several other textures (a scrollable zoomable map) for a waypoint based navigation interface.
http://www.unifycommunity.com/wiki/index.php?title=TextureDrawLine
Is it possible to us this script with alpha channels? I need lines drawn over several other textures (a scrollable zoomable map) for a waypoint based navigation interface.
http://www.unifycommunity.com/wiki/index.php?title=TextureDrawLine
I haven’t tested this but since it takes a Color object as a parameter, you should just be able to set the alpha on the color.
When the pixels are drawn within the texture, there is no blending done–the line pixels will fully overwrite any previous pixels regardless of the alpha value. But you can of course use a separate object with a transparent material that will contain the line-drawing texture, and this way have the lines overlay whatever you like, which is maybe what you were planning anyway. (As opposed to drawing lines directly into the map texture itself.) In this case the alpha value of the line color will behave as you’d expect, but it’s probably easier just to control the overall alpha of the entire texture. (i.e., “renderer.material.color.a = .5” or whatever.)
–Eric
Thanks!
What will be faster on the iphone - using your function or trying to do it with the line renderer?
And will doing A LOT of " texture.Apply();" cause memory problems?
Probably the line renderer.
It will cause slowness problems.
–Eric
yes - just tested to move a line upwards - it’S extremely slow on the 1st gen touch
The line renderer is MUCH faster and with Camera.ScreenToWorldPoint i can do all i wanted to do.