/// <summary> /// 检测文件. /// </summary> /// <returns><c>true</c>, OK, <c>false</c> NG.</returns> /// <param name="iPath">路径.</param> public static bool CheckFile(string iPath) { if (ResourcesLoad.Load(iPath) != null) { return(true); } return(false); }
public static Object LoadFromResource(string path) { Object objRet = ResourcesLoad.Load(path) as Object; if (null == objRet) { UtilsLog.Warning("DataLoadController", "LoadFromResource():Load Failed!!(path:{0})", path); } return(objRet); }
/// <summary> /// 加载函数(单个:同步). /// </summary> /// <returns>加载对象</returns> /// <param name="iPath">路径.</param> public static T Load <T>(string iPath) where T : UnityEngine.Object { if (true == string.IsNullOrEmpty(iPath)) { return(default(T)); } T objRet = default(T); objRet = AssetBundlesManager.Instance.LoadFromAssetBundle <T>(iPath); if (null == objRet) { objRet = ResourcesLoad.Load <T>(iPath); } return(objRet); }