物体未显示时直接finish

This commit is contained in:
shenjianxing 2025-01-22 10:59:25 +08:00
parent a28f22f38a
commit 6228329b2a

View File

@ -65,7 +65,10 @@ namespace QFramework
if (obj.activeSelf == false) if (obj.activeSelf == false)
{ {
Debug.LogError(obj.name + "当前是隐藏状态"); Debug.LogError(obj.name + "当前是隐藏状态");
this.Finish();
} }
else
{
try try
{ {
anim = obj.GetComponent<Animation>(); anim = obj.GetComponent<Animation>();
@ -112,8 +115,11 @@ namespace QFramework
} }
catch (Exception) catch (Exception)
{ {
anim = obj.GetComponent<Animation>();
Debug.LogError($"{path} 播放动画 {animName} 出错"); Debug.LogError($"{path} 播放动画 {animName} 出错");
} }
}
} }
else else