增加错误日志

This commit is contained in:
shenjianxing 2024-12-31 13:16:06 +08:00
parent c3f7e8949e
commit bb57c527b7

View File

@ -45,6 +45,8 @@ namespace QFramework
{ {
GameObject obj = Utility.FindObj(path); GameObject obj = Utility.FindObj(path);
if (obj != null) if (obj != null)
{
try
{ {
anim = obj.GetComponent<Animation>(); anim = obj.GetComponent<Animation>();
@ -68,8 +70,15 @@ namespace QFramework
anim.Play(animName); anim.Play(animName);
} }
} }
catch (Exception)
{
Debug.LogError($"{path} 播放动画 {animName} 出错");
}
}
else else
{ {
Debug.LogError("未找到路径:" + path);
this.Finish(); this.Finish();
} }
} }