新增动态性能优化的开关

This commit is contained in:
2025-11-29 00:44:05 +08:00
parent ee7bd2d800
commit 1be9783491
7 changed files with 66 additions and 22 deletions

View File

@@ -222,16 +222,16 @@ namespace Demo.Game
rootGameObject.SetContent("SongLength", MainAudio.CurrentClip.length);
yield return rootGameObject.ParseScript2Expr(rootObject.LoadAsText());
yield return rootGameObject.ApplyScript();
IEnumerator DFS(ScriptableObject parent)
IEnumerator NDFS(ScriptableObject current)
{
foreach (var child in parent.Childs)
foreach (var child in current.Childs)
{
if (child.IsScriptApply == false)
yield return child.ApplyScript();
yield return DFS(child);
yield return NDFS(child);
}
if (current.IsScriptApply == false)
yield return current.ApplyScript();
}
yield return DFS(rootGameObject);
yield return NDFS(rootGameObject);
}
}
finally