1.全阶段异步加载与AB包预加载2.node加载无效的问题依然存在
This commit is contained in:
@@ -16,6 +16,11 @@ namespace Demo.Game
|
||||
|
||||
protected override abstract void UpdateData(float data);
|
||||
|
||||
public override IEnumerator LoadScript(string script)
|
||||
{
|
||||
yield return base.LoadScript(script);
|
||||
}
|
||||
|
||||
public override IEnumerator UnloadScript()
|
||||
{
|
||||
MySplineCore = null;
|
||||
@@ -51,14 +56,15 @@ namespace Demo.Game
|
||||
</summary>
|
||||
<param name=""path"">脚本位置</param>
|
||||
")]
|
||||
public void Load(string path)
|
||||
public IEnumerator Load(string path)
|
||||
{
|
||||
var spline = FindWithPath(path, false);
|
||||
if (spline == null)
|
||||
spline = LoadSubScript(nameof(SplineCore), path);
|
||||
if (spline != null)
|
||||
MySplineCore = FindWithPath(path, false) as SplineCore;
|
||||
if (MySplineCore == null)
|
||||
{
|
||||
MySplineCore = spline as SplineCore;
|
||||
yield return LoadSubScriptAsync(nameof(SplineCore), path, x =>
|
||||
{
|
||||
MySplineCore = x as SplineCore;
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user