Example #1
0
        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;
        }
Example #2
0
 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);
 }
Example #3
0
 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);
 }