Grepper Logo

Unity color alpha not working


Change Material Rendering Mode from Opaque to Transparent, we need to do that elsewise it's not going to render out the alpha values. 

Using Code to change alpha value

Here we use Serializefield to show our value in the Inspector, just drag the Material into the empty Slot.

We also declare a Color variable called color and assign the color value from our Material to it.

In the Start() method we change the alpha value to 0 for it to be transparent.

And Finally we pass the colorNoAlpha Value to our Material color.


Continue with Google

By continuing, I agree that I have read and agree to Greppers's Terms of Service and Privacy Policy.