예제 #1
0
 // 资源清单检查
 bool CheckRes(GameResType type, string name, out GameBundleInfo data)
 {
     data = GameTable.GetGameBundleRes(type, name);
     if (data == null)
     {
         TTLoger.LogError("资源清单未找到资源 : " + name + ",请检查resBundle");
         return(false);
     }
     return(true);
 }
예제 #2
0
 // 检查资源表中是否有某个资源
 public static bool HasGameRes(GameResType type, string name)
 {
     if (AppConst.DevelopMode)
     {
         GameResInfo info = GameTable.GetGameRes(type, name);
         return(info != null);
     }
     else
     {
         GameBundleInfo info = GameTable.GetGameBundleRes(type, name);
         return(info != null);
     }
 }