예제 #1
0
        /// <summary>
        /// 加载资源
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="assetName"></param>
        /// <returns></returns>
        public T LoadAsset <T>(string assetName) where T : UnityEngine.Object
        {
            if (_resourceHelper == null)
            {
                return(null);
            }

            return(_resourceHelper.LoadAsset <T>(assetName));
        }
예제 #2
0
 /// <summary>
 /// 加载资源
 /// </summary>
 /// <typeparam name="T"></typeparam>
 /// <param name="assetbundlename"></param>
 /// <param name="assetname"></param>
 /// <returns></returns>
 public T LoadAsset <T>(string assetbundlename, string assetname) where T : UnityEngine.Object
 {
     return(_resourceHelper?.LoadAsset <T>(assetbundlename, assetname));
 }
예제 #3
0
 /// <summary>
 /// 加载资源
 /// </summary>
 /// <typeparam name="T"></typeparam>
 /// <param name="assetBundleName"></param>
 /// <param name="assetName"></param>
 /// <returns></returns>
 public Task <T> LoadAsset <T>(string assetBundleName, string assetName) where T : UnityEngine.Object
 {
     return(_resourceHelper?.LoadAsset <T>(assetBundleName, assetName));
 }