Skip to content

Instantly share code, notes, and snippets.

@skymeson
Created July 16, 2019 20:59
Show Gist options
  • Select an option

  • Save skymeson/4cd63650d55676cf01ee6906c6d6419d to your computer and use it in GitHub Desktop.

Select an option

Save skymeson/4cd63650d55676cf01ee6906c6d6419d to your computer and use it in GitHub Desktop.
Opacity Changer
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