1.修复Updatement中遗漏的bug2.对生成进行了一定的优化
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user