Esempio n. 1
0
 public static List <string> LoadAllListTextFromList(
     string _assetbundleFolder,
     string _strLoadFile,
     ref List <string> lst,
     List <string> _OmitFolderName = null)
 {
     GlobalMethod.lstABName.Clear();
     GlobalMethod.lstABName = GlobalMethod.GetAssetBundleNameListFromPath(_assetbundleFolder, false);
     GlobalMethod.lstABName.Sort();
     for (int index = 0; index < GlobalMethod.lstABName.Count; ++index)
     {
         string stringRight = YS_Assist.GetStringRight(Path.GetFileNameWithoutExtension(GlobalMethod.lstABName[index]), 2);
         if (_OmitFolderName == null || !_OmitFolderName.Contains(stringRight))
         {
             if (GlobalMethod.AssetFileExist(GlobalMethod.lstABName[index], _strLoadFile, string.Empty))
             {
                 TextAsset textAsset = CommonLib.LoadAsset <TextAsset>(GlobalMethod.lstABName[index], _strLoadFile, false, string.Empty);
                 AssetBundleManager.UnloadAssetBundle(GlobalMethod.lstABName[index], true, (string)null, false);
                 if (!Object.op_Equality((Object)textAsset, (Object)null))
                 {
                     lst.Add(textAsset.get_text());
                 }
             }
         }
     }
     return(lst);
 }
Esempio n. 2
0
 public static List <ExcelData.Param> LoadExcelDataAlFindlFile(
     string _strAssetPath,
     string _strFileName,
     int sCell,
     int sRow,
     int eCell,
     int eRow,
     List <string> _OmitFolderName = null,
     bool _isWarning = true)
 {
     GlobalMethod.lstABName.Clear();
     GlobalMethod.lstABName = GlobalMethod.GetAssetBundleNameListFromPath(_strAssetPath, false);
     GlobalMethod.lstABName.Sort();
     for (int index1 = 0; index1 < GlobalMethod.lstABName.Count; ++index1)
     {
         GlobalMethod.strNo.Clear();
         GlobalMethod.strNo.Append(Path.GetFileNameWithoutExtension(GlobalMethod.lstABName[index1]));
         GlobalMethod.strNo.Replace(GlobalMethod.strNo.ToString(), YS_Assist.GetStringRight(GlobalMethod.strNo.ToString(), 2));
         if (_OmitFolderName == null || !_OmitFolderName.Contains(GlobalMethod.strNo.ToString()))
         {
             string[] allAssetName = AssetBundleCheck.GetAllAssetName(GlobalMethod.lstABName[index1], false, (string)null, false);
             bool     flag         = false;
             for (int index2 = 0; index2 < allAssetName.Length; ++index2)
             {
                 if (allAssetName[index2].Compare(_strFileName, true))
                 {
                     flag = true;
                     break;
                 }
             }
             if (!flag)
             {
                 GlobalMethod.DebugLog("[" + GlobalMethod.lstABName[index1] + "][" + _strFileName + "]は見つかりません", 1);
             }
             else
             {
                 List <ExcelData.Param> objList = GlobalMethod.LoadExcelData(GlobalMethod.lstABName[index1], _strFileName, sCell, sRow, eCell, eRow, _isWarning);
                 if (objList != null)
                 {
                     return(objList);
                 }
             }
         }
     }
     return((List <ExcelData.Param>)null);
 }
Esempio n. 3
0
    public static List <T> LoadAllFolder <T>(
        string _findFolder,
        string _strLoadFile,
        List <string> _OmitFolderName = null)
        where T : Object
    {
        List <T> objList = new List <T>();

        GlobalMethod.lstABName.Clear();
        GlobalMethod.lstABName = GlobalMethod.GetAssetBundleNameListFromPath(_findFolder, false);
        GlobalMethod.lstABName.Sort();
        for (int index1 = 0; index1 < GlobalMethod.lstABName.Count; ++index1)
        {
            string stringRight = YS_Assist.GetStringRight(Path.GetFileNameWithoutExtension(GlobalMethod.lstABName[index1]), 2);
            if (_OmitFolderName == null || !_OmitFolderName.Contains(stringRight))
            {
                string[] allAssetName = AssetBundleCheck.GetAllAssetName(GlobalMethod.lstABName[index1], false, (string)null, false);
                bool     flag         = false;
                for (int index2 = 0; index2 < allAssetName.Length; ++index2)
                {
                    if (allAssetName[index2].Compare(_strLoadFile, true))
                    {
                        flag = true;
                        break;
                    }
                }
                if (!flag)
                {
                    GlobalMethod.DebugLog("[" + GlobalMethod.lstABName[index1] + "][" + _strLoadFile + "]は見つかりません", 1);
                }
                else
                {
                    T obj = CommonLib.LoadAsset <T>(GlobalMethod.lstABName[index1], _strLoadFile, false, string.Empty);
                    AssetBundleManager.UnloadAssetBundle(GlobalMethod.lstABName[index1], true, (string)null, false);
                    if (Object.op_Implicit((Object)(object)obj))
                    {
                        objList.Add(obj);
                    }
                }
            }
        }
        return(objList);
    }
Esempio n. 4
0
    public static string LoadAllListText(
        string _assetbundleFolder,
        string _strLoadFile,
        List <string> _OmitFolderName = null)
    {
        StringBuilder stringBuilder = new StringBuilder();

        GlobalMethod.lstABName.Clear();
        GlobalMethod.lstABName = GlobalMethod.GetAssetBundleNameListFromPath(_assetbundleFolder, false);
        GlobalMethod.lstABName.Sort();
        for (int index1 = 0; index1 < GlobalMethod.lstABName.Count; ++index1)
        {
            string stringRight = YS_Assist.GetStringRight(Path.GetFileNameWithoutExtension(GlobalMethod.lstABName[index1]), 2);
            if (_OmitFolderName == null || !_OmitFolderName.Contains(stringRight))
            {
                string[] allAssetName = AssetBundleCheck.GetAllAssetName(GlobalMethod.lstABName[index1], false, (string)null, false);
                bool     flag         = false;
                for (int index2 = 0; index2 < allAssetName.Length; ++index2)
                {
                    if (allAssetName[index2].Compare(_strLoadFile, true))
                    {
                        flag = true;
                        break;
                    }
                }
                if (!flag)
                {
                    GlobalMethod.DebugLog("[" + GlobalMethod.lstABName[index1] + "][" + _strLoadFile + "]は見つかりません", 1);
                }
                else
                {
                    TextAsset textAsset = CommonLib.LoadAsset <TextAsset>(GlobalMethod.lstABName[index1], _strLoadFile, false, string.Empty);
                    AssetBundleManager.UnloadAssetBundle(GlobalMethod.lstABName[index1], true, (string)null, false);
                    if (!Object.op_Equality((Object)textAsset, (Object)null))
                    {
                        stringBuilder.Append(textAsset.get_text());
                    }
                }
            }
        }
        return(stringBuilder.ToString());
    }
Esempio n. 5
0
 public static T LoadAllFolderInOneFile <T>(
     string _findFolder,
     string _strLoadFile,
     List <string> _OmitFolderName = null)
     where T : Object
 {
     GlobalMethod.lstABName.Clear();
     GlobalMethod.lstABName = GlobalMethod.GetAssetBundleNameListFromPath(_findFolder, false);
     GlobalMethod.lstABName.Sort();
     for (int index = 0; index < GlobalMethod.lstABName.Count; ++index)
     {
         string stringRight = YS_Assist.GetStringRight(Path.GetFileNameWithoutExtension(GlobalMethod.lstABName[index]), 2);
         if (_OmitFolderName == null || !_OmitFolderName.Contains(stringRight))
         {
             if (GlobalMethod.AssetFileExist(GlobalMethod.lstABName[index].ToString(), _strLoadFile, string.Empty))
             {
                 T obj = CommonLib.LoadAsset <T>(GlobalMethod.lstABName[index], _strLoadFile, false, string.Empty);
                 AssetBundleManager.UnloadAssetBundle(GlobalMethod.lstABName[index], true, (string)null, false);
                 return(obj);
             }
         }
     }
     return((T)null);
 }