Example #1
0
 public void ApplyTheme(string colorName, ThemeColor target)
 {
     if (TryGetColor(colorName, out Color color))
     {
         ApplyColor(target, color);
     }
 }
Example #2
0
        private static void ApplyColor(ThemeColor target, Color color)
        {
            var graphic = target.GetComponent <Graphic>();

            if (graphic == null)
            {
                Log.w("Passed target graphic was null!"); return;
            }
            graphic.color = color;
        }