修复Label在初始化时会堆积的问题

This commit is contained in:
monitor1394
2024-07-12 19:53:30 +08:00
parent 6d41daa678
commit 99d824e3a0
3 changed files with 19 additions and 4 deletions

View File

@@ -41,6 +41,23 @@ namespace XCharts.Runtime
return s_Builder.ToString();
}
public static bool IsActiveByScale(GameObject gameObject)
{
if (gameObject == null) return false;
return IsActiveByScale(gameObject.transform);
}
public static bool IsActiveByScale(Image image)
{
if (image == null) return false;
return IsActiveByScale(image.gameObject);
}
public static bool IsActiveByScale(Transform transform)
{
return transform.localScale != Vector3.zero;
}
public static bool SetActive(GameObject gameObject, bool active)
{
if (gameObject == null) return false;