- Home /
Generate Zones from Texture
Image enough for ask :)
Working on 3D not 2D. How can i do this?
Sure its will be on a mesh or generate mesh from it etc...
Answer by Bunny83 · Aug 09, 2012 at 04:50 PM
Ok i put that texture on an invisible (for camera) mesh, good. And with RaycastHit.textureCoord, i can get selected area info. Done we know where clicked.
But how to change its color?
$$anonymous$$aybe create another mesh and copy texture and paint selected area to selection color and other areas with 0 alpha (for example if Color(10,10,10) paint it to yellow else paint it to transparent)?
I will test that. Do you have a suggestion like that or what you think about performance of this?
Yey, finally they fixed the Unify Wiki ;)
I've posted a
floodfill algorithm there that might be useful. Alternatively you can use precreated textures for each area.
Oh, it seems the wiki has been taken over by Unity
Your answer
Follow this Question
Related Questions
Distribute terrain in zones 3 Answers
Best way to generate texture coordinates? 1 Answer
How to create TMP_FontAsset by new image and glyph data? 0 Answers
Generating UV maps via Unity 0 Answers