in game - how to partly invisible an object ?

hi there,
i am new to unity so i am still learning … ^^

my question, i can create a texture with e.g. black areas , assign this to an object
and the black areas can went to transparent.

now i want to create this black / transparent areas in game, how can i do this ?

i would be nice if you could help me, thanks !!

Maybe you could create an object with several materials: one for the transparent parts, another for the normal parts. Your object would then have renderer.materials[0] for the transparent parts and renderer.materials[1] for the rest. Set your transparent material to use one of the transparent shaders. You should be able to set renderer.materials[0].color.a (the alpha channel) to a value between 0 and 1 when you want to adjust the transparency. I think the texture used for your transparent material needs to have some transparency in it for this to work (an alpha channel in a PNG for instance).

thanks for your replay
the areas should be dynamic

i thougth, i have a texture, and draw on that ingame
and assign that to the object with transparency information -but i dont know how :\