示例#1
0
        /// <summary>
        /// 异步加载资源。
        /// </summary>
        /// <param name="assetName">要加载资源的名称。</param>
        /// <param name="loadAssetCallbacks">加载资源回调函数集。</param>
        public void LoadAsset(string assetName, LoadAssetCallbacks loadAssetCallbacks)
        {
            if (string.IsNullOrEmpty(assetName))
            {
                throw new GameFrameworkException("Asset name is invalid.");
            }

            if (loadAssetCallbacks == null)
            {
                throw new GameFrameworkException("Load asset callbacks is invalid.");
            }

            m_ResourceLoader.LoadAsset(assetName, loadAssetCallbacks, null);
        }
示例#2
0
 public void LoadAsset(string assetName, LoadAssetCallbacks loadAssetCallbacks)
 {
     m_ResourceLoader.LoadAsset(assetName, loadAssetCallbacks, null);
 }
示例#3
0
 void LoadAsset()
 {
     m_ResourceLoader.LoadAsset(assetName);
 }