ソースコード
using UnityEngine;
<summary>
</summary>
public static class UIWidgetExtensions
{
<summary>
</summary>
public static void SetColorR(this UIWidget self, float r)
{
var color = self.color;
color.r = r;
self.color = color;
}
<summary>
</summary>
public static void SetColorG(this UIWidget self, float g)
{
var color = self.color;
color.g = g;
self.color = color;
}
<summary>
</summary>
public static void SetColorB(this UIWidget self, float b)
{
var color = self.color;
color.b = b;
self.color = color;
}
<summary>
</summary>
public static void SetColorA(this UIWidget self, float a)
{
var color = self.color;
color.a = a;
self.color = color;
}
}
関連記事