Completely remake mobile gameplayer buttons, and rever graphics renderer changes and just have linux on Vulkan instead
This commit is contained in:
21
Assets/Scripts/ButtonTextColorSync.cs
Normal file
21
Assets/Scripts/ButtonTextColorSync.cs
Normal file
@@ -0,0 +1,21 @@
|
||||
using UnityEngine;
|
||||
using TMPro;
|
||||
|
||||
public class ImageColorSync : MonoBehaviour
|
||||
{
|
||||
public TMP_Text originalText;
|
||||
public TMP_Text toSync;
|
||||
|
||||
void Update()
|
||||
{
|
||||
Color baseColor = originalText.color;
|
||||
Color graphicColor = originalText.canvasRenderer.GetColor();
|
||||
|
||||
toSync.color = new Color(
|
||||
baseColor.r * graphicColor.r,
|
||||
baseColor.g * graphicColor.g,
|
||||
baseColor.b * graphicColor.b,
|
||||
baseColor.a * graphicColor.a
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user