asset integration 50%
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
using UnityEngine;
|
||||
|
||||
public class CanvasGroupUtils : MonoBehaviour
|
||||
{
|
||||
public UnityEngine.UI.Graphic[] graphics;
|
||||
public bool useOverrideColor = false;
|
||||
public Color overrideColor = Color.white;
|
||||
|
||||
|
||||
void OnValidate()
|
||||
{
|
||||
RefreshColor();
|
||||
}
|
||||
|
||||
|
||||
void Update()
|
||||
{
|
||||
RefreshColor();
|
||||
}
|
||||
|
||||
|
||||
void RefreshColor(){
|
||||
if(useOverrideColor)
|
||||
{
|
||||
foreach(var graphic in graphics)
|
||||
{
|
||||
graphic.color = new Color(overrideColor.r, overrideColor.g, overrideColor.b, overrideColor.a);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user