解决了node的问题(脚本编写错误并非代码错误)

This commit is contained in:
2025-10-06 17:43:21 +08:00
parent 334f55a250
commit 60a5347dde
4 changed files with 28 additions and 25 deletions

View File

@@ -162,9 +162,13 @@ namespace Demo.Game
{
yield return LoadSubScriptAsync(nameof(SplineNode), path, node =>
{
if (node != null)
if (node is SplineNode _node)
{
MySplineNodes.Add(node as SplineNode);
MySplineNodes.Add(_node );
}
else
{
Debug.LogError($"{path} is not {nameof(SplineNode)}", this);
}
});
}