Created
October 21, 2013 07:53
-
-
Save AngryAnt/7080116 to your computer and use it in GitHub Desktop.
Silly workaround for easy alpha scaling on the Unity Color type.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static Color A (this Color color, float alphaScale) | |
{ | |
return new Color (color.r, color.g, color.b, color.a * alphaScale); | |
} | |
// Gizmos.color = Color.red.A (0.3f); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment