mirror of
https://github.com/XCharts-Team/XCharts.git
synced 2026-05-22 08:50:10 +00:00
Merge pull request #274 from Ambitroc/ambitroc
修复Chart在特定情况下销毁时UGUI报错问题
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using UnityEngine.UI;
|
using UnityEngine.UI;
|
||||||
|
|
||||||
namespace XCharts.Runtime
|
namespace XCharts.Runtime
|
||||||
@@ -55,17 +55,10 @@ namespace XCharts.Runtime
|
|||||||
|
|
||||||
protected override void Awake()
|
protected override void Awake()
|
||||||
{
|
{
|
||||||
base.Awake();
|
|
||||||
raycastTarget = false;
|
raycastTarget = false;
|
||||||
SetActive(true);
|
SetActive(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void OnDestroy()
|
|
||||||
{
|
|
||||||
base.OnDestroy();
|
|
||||||
GraphicRegistry.UnregisterGraphicForCanvas(canvas, this);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void SetTextPadding(TextPadding padding)
|
public void SetTextPadding(TextPadding padding)
|
||||||
{
|
{
|
||||||
m_PaddingLeft = padding.left;
|
m_PaddingLeft = padding.left;
|
||||||
@@ -202,11 +195,6 @@ namespace XCharts.Runtime
|
|||||||
return transform.localPosition;
|
return transform.localPosition;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override bool IsActive()
|
|
||||||
{
|
|
||||||
return m_Active;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void SetActive(bool flag)
|
public void SetActive(bool flag)
|
||||||
{
|
{
|
||||||
m_Active = flag;
|
m_Active = flag;
|
||||||
|
|||||||
Reference in New Issue
Block a user