Example #1
0
        private void OnGUI()
        {
            List <Request> requestTasks = m_Manager.m_RequestTasks;

            for (Int32 i = 0; i < requestTasks.Count; i++)
            {
                Request request = requestTasks[i];
                GUILayout.Label(String.Concat(new Object[]
                {
                    "Request: '",
                    request.Name,
                    "' ",
                    request.IsDone,
                    " ",
                    request.Progress.ToString("0.0")
                }), new GUILayoutOption[0]);
            }
            List <AssetAsyncLoad> assetAsyncTasks = m_Manager.m_AssetAsyncTasks;

            for (Int32 j = 0; j < assetAsyncTasks.Count; j++)
            {
                AssetAsyncLoad assetAsyncLoad = assetAsyncTasks[j];
                GUILayout.Label(String.Concat(new Object[]
                {
                    "AssetRequest: '",
                    assetAsyncLoad.Key.Name,
                    "' ",
                    assetAsyncLoad.IsDone,
                    " ",
                    assetAsyncLoad.Progress.ToString("0.0")
                }), new GUILayoutOption[0]);
            }
        }
Example #2
0
 public EStatus LoadAsset(AssetKey key, out AssetAsyncLoad assetLoader)
 {
     if (m_CachedAssetBundleObject != null && m_CachedAssetBundleObject.Contains(key.Name))
     {
         SetCachedAssetMap(key, EStatus.Load, null);
         UnityEngine.AssetBundleRequest asyncRequest = m_CachedAssetBundleObject.LoadAsync(key.Name, key.Type);
         assetLoader = new AssetAsyncLoad(this, key, asyncRequest);
         return(EStatus.Load);
     }
     assetLoader = default(AssetAsyncLoad);
     return(EStatus.Error);
 }