1.全阶段异步加载与AB包预加载2.node加载无效的问题依然存在
This commit is contained in:
@@ -28,7 +28,6 @@ namespace Demo.Game
|
||||
[Content] public AssetBundle LinesAssetBundle;
|
||||
[Content] public string LineMaterial;
|
||||
[Content] public Material MyLineMaterial;
|
||||
IEnumerator AssetBundleLoading;
|
||||
|
||||
public abstract Vector3 EvaluateClipFromPosition(float time);
|
||||
|
||||
@@ -42,7 +41,6 @@ namespace Demo.Game
|
||||
this.GetOrAddComponent<MeshFilter>();
|
||||
MyMeshRenderer = this.GetOrAddComponent<MeshRenderer>();
|
||||
MyMeshRenderer.enabled = true;
|
||||
yield return AssetBundleLoading;
|
||||
if (string.IsNullOrEmpty(LinesAssetBundlePath) == false)
|
||||
{
|
||||
var ir = LinesAssetBundle.LoadAssetAsync<Material>(LineMaterial);
|
||||
@@ -85,9 +83,9 @@ namespace Demo.Game
|
||||
}
|
||||
|
||||
[ScriptableCall(DependOnSplineCoreUtility.LoadSplineDescription)]
|
||||
public void LoadSpline(string path)
|
||||
public IEnumerator LoadSpline(string path)
|
||||
{
|
||||
this.LoadSplineTool(path);
|
||||
yield return this.LoadSplineTool(path);
|
||||
}
|
||||
|
||||
|
||||
@@ -103,9 +101,9 @@ namespace Demo.Game
|
||||
<param name=""ab""></param>
|
||||
<param name=""material""></param>
|
||||
")]
|
||||
public void LoadMaterial(string ab, string material)
|
||||
public IEnumerator LoadMaterial(string ab, string material)
|
||||
{
|
||||
AssetBundleLoading = this.LoadAssetBundle(ab, x =>
|
||||
yield return this.LoadAssetBundle(ab, x =>
|
||||
{
|
||||
LinesAssetBundlePath = ab;
|
||||
LinesAssetBundle = x;
|
||||
|
||||
Reference in New Issue
Block a user