1.修复Updatement中遗漏的bug2.对生成进行了一定的优化

This commit is contained in:
2025-12-03 16:58:56 +08:00
parent c80d5140bc
commit 174a8c6df2
5 changed files with 56 additions and 31 deletions

View File

@@ -221,17 +221,23 @@ namespace Demo.Game
rootGameObject.SetContent(nameof(IsAutoPlay), IsAutoPlay ? 1 : 0);
rootGameObject.SetContent("SongLength", MainAudio.CurrentClip.length);
yield return rootGameObject.ParseFromScriptFile2Expr(rootObject);
static void NDFS(ScriptableObject current)
int NDFSCount = 0;
IEnumerator NDFS(ScriptableObject current)
{
foreach (var child in current.Childs)
{
NDFS(child);
ConventionUtility.StartCoroutine(NDFS(child));
NDFSCount++;
if(NDFSCount % 100 == 0)
{
yield return null;
}
}
if (current.IsScriptApply == false)
ConventionUtility.StartCoroutine(current.ApplyScript());
}
//yield return
NDFS(rootGameObject);
ConventionUtility.StartCoroutine(NDFS(rootGameObject));
}
}
finally