private IEnumerator LoadSpriteAssetAsync(string url) { m_ResourcesUrl = url; m_BridgeLoader = BridgeLoader.LoadAsset(url, LoadAssetModel.Async, null, false); while (m_BridgeLoader.IsCompleted == false) { yield return(null); } OnCompleteLoad(m_BridgeLoader.IsError, m_BridgeLoader.Description, m_BridgeLoader.ResultObj, m_BridgeLoader.IsCompleted); yield break; }
private void LoadMaterialAssetSync(string url) { m_ResourcesUrl = url; m_BridgeLoader = BridgeLoader.LoadAsset(url, LoadAssetModel.Sync, null, false); OnCompleteLoad(m_BridgeLoader.IsError, m_BridgeLoader.Description, m_BridgeLoader.ResultObj, m_BridgeLoader.IsCompleted); }
private void LoadSceneAssetSync(string url) { m_ResourcesUrl = url; m_BridgeLoader = BridgeLoader.LoadAsset(url, LoadAssetModel.Sync, null, true); //这里的第三个参数必须是true 标识是加载场景 否则会报错 OnCompleteLoad(m_BridgeLoader.IsError, m_BridgeLoader.Description, m_BridgeLoader.ResultObj, m_BridgeLoader.IsCompleted); }