/// <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)); }
/// <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)); }
/// <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)); }