增加错误日志

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);
if (obj != null)
{
try
{
anim = obj.GetComponent<Animation>();
@ -60,7 +62,7 @@ namespace QFramework
else
{
float curSpeed = 1;
if (string.IsNullOrEmpty(speed)==false)
if (string.IsNullOrEmpty(speed) == false)
{
float.TryParse(speed, out curSpeed);
}
@ -68,8 +70,15 @@ namespace QFramework
anim.Play(animName);
}
}
catch (Exception)
{
Debug.LogError($"{path} 播放动画 {animName} 出错");
}
}
else
{
Debug.LogError("未找到路径:" + path);
this.Finish();
}
}