Created
July 16, 2019 20:59
-
-
Save skymeson/4cd63650d55676cf01ee6906c6d6419d to your computer and use it in GitHub Desktop.
Opacity Changer
This file contains hidden or 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
| using UnityEngine; | |
| public class OpacityChanger : MonoBehaviour | |
| { | |
| public Material target; | |
| public void UpdateOpacity(float alphaValue) | |
| { | |
| Color color = target.color; | |
| color.a = alphaValue; | |
| target.color = color; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment