优化加载Apply
This commit is contained in:
@@ -221,17 +221,17 @@ namespace Demo.Game
|
||||
rootGameObject.SetContent(nameof(IsAutoPlay), IsAutoPlay ? 1 : 0);
|
||||
rootGameObject.SetContent("SongLength", MainAudio.CurrentClip.length);
|
||||
yield return rootGameObject.ParseScript2Expr(rootObject.LoadAsText());
|
||||
yield return rootGameObject.ApplyScript();
|
||||
IEnumerator NDFS(ScriptableObject current)
|
||||
static void NDFS(ScriptableObject current)
|
||||
{
|
||||
foreach (var child in current.Childs)
|
||||
{
|
||||
yield return NDFS(child);
|
||||
NDFS(child);
|
||||
}
|
||||
if (current.IsScriptApply == false)
|
||||
yield return current.ApplyScript();
|
||||
ConventionUtility.StartCoroutine(current.ApplyScript());
|
||||
}
|
||||
yield return NDFS(rootGameObject);
|
||||
//yield return
|
||||
NDFS(rootGameObject);
|
||||
}
|
||||
}
|
||||
finally
|
||||
|
||||
Reference in New Issue
Block a user