Exemple #1
0
        /// <summary>
        /// 异步加载资源。
        /// </summary>
        /// <param name="assetName">要加载资源的名称。</param>
        /// <param name="loadAssetCallbacks">加载资源回调函数集。</param>
        /// <param name="userData">用户自定义数据。</param>
        public void LoadAsset(string assetName, LoadAssetCallbackEvent loadAssetCallbacks, object userData)
        {
            var loginA = Resources.Load(assetName, typeof(GameObject));

            if (loadAssetCallbacks.LoadAssetSuccessCallback != null)
            {
                loadAssetCallbacks.LoadAssetSuccessCallback.Invoke(assetName, loginA, GetDownloadProgress(), userData);
            }
        }
Exemple #2
0
 /// <summary>
 /// 异步加载资源。
 /// </summary>
 /// <param name="assetName">要加载资源的名称。</param>
 /// <param name="loadAssetCallbacks">加载资源回调函数集。</param>
 public void LoadAsset(string assetName, LoadAssetCallbackEvent loadAssetCallbacks)
 {
 }