Compare commits

...

2 Commits

Author SHA1 Message Date
b43c2ad768 1 2025-03-02 14:28:52 +08:00
231f04d41d Lua源码与配置文件加密压缩为ZIP文件,解密 2025-03-02 14:27:27 +08:00
18 changed files with 2284 additions and 194 deletions

File diff suppressed because it is too large Load Diff

View File

@ -17,8 +17,163 @@ MonoBehaviour:
m_SerializedData: []
m_GUID: de968e084f233d94a91afdd1e4c7b3d1
m_SerializeEntries:
- m_GUID: 0b08b76d8a601434ebc0eb277910ea91
m_Address: Assets/Content/Audio/BGM
- m_GUID: 19936d34efb18c340a6ed536b298e84f
m_Address: Assets/Content/Audio/BGM/Fight_01.ogg
m_ReadOnly: 0
m_SerializedLabels: []
FlaggedDuringContentUpdateRestriction: 0
- m_GUID: 16ba1c82a7da1a64badc0385990416f9
m_Address: Assets/Content/Audio/BGM/bgm_01.ogg
m_ReadOnly: 0
m_SerializedLabels: []
FlaggedDuringContentUpdateRestriction: 0
- m_GUID: 6618c3f2ad60d2f429280c48a01f8805
m_Address: Assets/Content/Audio/BGM/bgm_02.ogg
m_ReadOnly: 0
m_SerializedLabels: []
FlaggedDuringContentUpdateRestriction: 0
- m_GUID: 2a4210040b9cbf74e90cc942c9517490
m_Address: Assets/Content/Audio/BGM/bgm_03.ogg
m_ReadOnly: 0
m_SerializedLabels: []
FlaggedDuringContentUpdateRestriction: 0
- m_GUID: eb4b6eea72b8116488840b5af586b9e0
m_Address: Assets/Content/Audio/BGM/bgm_04.ogg
m_ReadOnly: 0
m_SerializedLabels: []
FlaggedDuringContentUpdateRestriction: 0
- m_GUID: d4668f456d2b95b4f814dd7ff5ed2b2c
m_Address: Assets/Content/Audio/BGM/bgm_05.ogg
m_ReadOnly: 0
m_SerializedLabels: []
FlaggedDuringContentUpdateRestriction: 0
- m_GUID: e8e9190cefb0fd8499f58611735facd7
m_Address: Assets/Content/Audio/BGM/bgm_06.ogg
m_ReadOnly: 0
m_SerializedLabels: []
FlaggedDuringContentUpdateRestriction: 0
- m_GUID: e124cbb7edda7f8429d5eaf768590c8a
m_Address: Assets/Content/Audio/BGM/bgm_07.ogg
m_ReadOnly: 0
m_SerializedLabels: []
FlaggedDuringContentUpdateRestriction: 0
- m_GUID: 8df18c7c92b85ef4182b1b37a07ed3d1
m_Address: Assets/Content/Audio/BGM/bgm_08.ogg
m_ReadOnly: 0
m_SerializedLabels: []
FlaggedDuringContentUpdateRestriction: 0
- m_GUID: f11f22ec5f8f2ae4aa63abf30d817418
m_Address: Assets/Content/Audio/BGM/bgm_09.ogg
m_ReadOnly: 0
m_SerializedLabels: []
FlaggedDuringContentUpdateRestriction: 0
- m_GUID: f85e7397162157a40b9c4eae944de57e
m_Address: Assets/Content/Audio/BGM/bgm_10.ogg
m_ReadOnly: 0
m_SerializedLabels: []
FlaggedDuringContentUpdateRestriction: 0
- m_GUID: 819c749e79b111443bfca7f4c56d8a18
m_Address: Assets/Content/Audio/BGM/bgm_11.ogg
m_ReadOnly: 0
m_SerializedLabels: []
FlaggedDuringContentUpdateRestriction: 0
- m_GUID: 5d55a634aec48b5479d7138f4beaaa81
m_Address: Assets/Content/Audio/BGM/bgm_12.ogg
m_ReadOnly: 0
m_SerializedLabels: []
FlaggedDuringContentUpdateRestriction: 0
- m_GUID: 41e336c6e3be29c4ab416b2420ddf65d
m_Address: Assets/Content/Audio/BGM/bgm_13.ogg
m_ReadOnly: 0
m_SerializedLabels: []
FlaggedDuringContentUpdateRestriction: 0
- m_GUID: 14a02ee98545a7d449c4fdf551d90cad
m_Address: Assets/Content/Audio/BGM/bgm_14.ogg
m_ReadOnly: 0
m_SerializedLabels: []
FlaggedDuringContentUpdateRestriction: 0
- m_GUID: 743efdcf7d6ff564fb621af8637eeef3
m_Address: Assets/Content/Audio/BGM/bgm_15.ogg
m_ReadOnly: 0
m_SerializedLabels: []
FlaggedDuringContentUpdateRestriction: 0
- m_GUID: ba8d704f3bf2cba44b467ebda7f9bcf3
m_Address: Assets/Content/Audio/BGM/bgm_16.ogg
m_ReadOnly: 0
m_SerializedLabels: []
FlaggedDuringContentUpdateRestriction: 0
- m_GUID: 6d74d98eefb159742a7c87c0c302e839
m_Address: Assets/Content/Audio/BGM/bgm_17.ogg
m_ReadOnly: 0
m_SerializedLabels: []
FlaggedDuringContentUpdateRestriction: 0
- m_GUID: fb1b45f27dd7134489bb1141eb4413c0
m_Address: Assets/Content/Audio/BGM/bgm_18.ogg
m_ReadOnly: 0
m_SerializedLabels: []
FlaggedDuringContentUpdateRestriction: 0
- m_GUID: 9b4e635dafde60443a97967ab1765bd7
m_Address: Assets/Content/Audio/BGM/bgm_19.ogg
m_ReadOnly: 0
m_SerializedLabels: []
FlaggedDuringContentUpdateRestriction: 0
- m_GUID: 5fc4c3ceb179cda4ebd0d99093d5bc7e
m_Address: Assets/Content/Audio/BGM/bgm_20.ogg
m_ReadOnly: 0
m_SerializedLabels: []
FlaggedDuringContentUpdateRestriction: 0
- m_GUID: efacc7f96693beb40a49b62c5c8b27dc
m_Address: Assets/Content/Audio/BGM/bgm_21.ogg
m_ReadOnly: 0
m_SerializedLabels: []
FlaggedDuringContentUpdateRestriction: 0
- m_GUID: 3b5ecb318a8006c4b998e5a62b29fef4
m_Address: Assets/Content/Audio/BGM/bgm_city_aldebaran.ogg
m_ReadOnly: 0
m_SerializedLabels: []
FlaggedDuringContentUpdateRestriction: 0
- m_GUID: 35726b5ad8dd2d348a7d4e3325e3edfe
m_Address: Assets/Content/Audio/BGM/bgm_city_geffen.ogg
m_ReadOnly: 0
m_SerializedLabels: []
FlaggedDuringContentUpdateRestriction: 0
- m_GUID: 8a1c7179bdf70c94f99c8a6c00d525be
m_Address: Assets/Content/Audio/BGM/bgm_city_klsthmgc.ogg
m_ReadOnly: 0
m_SerializedLabels: []
FlaggedDuringContentUpdateRestriction: 0
- m_GUID: b798434869ddfb6419aa123375bfbb49
m_Address: Assets/Content/Audio/BGM/bgm_city_morroc.ogg
m_ReadOnly: 0
m_SerializedLabels: []
FlaggedDuringContentUpdateRestriction: 0
- m_GUID: 18ef563259de6f94fa3d0d9d7417fc83
m_Address: Assets/Content/Audio/BGM/bgm_city_payon.ogg
m_ReadOnly: 0
m_SerializedLabels: []
FlaggedDuringContentUpdateRestriction: 0
- m_GUID: 401d24149d8c2794e940a803d5cc3a3a
m_Address: Assets/Content/Audio/BGM/bgm_city_protera.ogg
m_ReadOnly: 0
m_SerializedLabels: []
FlaggedDuringContentUpdateRestriction: 0
- m_GUID: d2b742e6309282d46a16c0dd460a57c2
m_Address: Assets/Content/Audio/BGM/bgm_city_ysdld.ogg
m_ReadOnly: 0
m_SerializedLabels: []
FlaggedDuringContentUpdateRestriction: 0
- m_GUID: 57207bce462f9204ea43e721b5ac41c8
m_Address: Assets/Content/Audio/BGM/bgm_login.ogg
m_ReadOnly: 0
m_SerializedLabels: []
FlaggedDuringContentUpdateRestriction: 0
- m_GUID: 5f863e06e71d83546bce7391108b1529
m_Address: Assets/Content/Audio/BGM/bgm_ready1.ogg
m_ReadOnly: 0
m_SerializedLabels: []
FlaggedDuringContentUpdateRestriction: 0
- m_GUID: f553aaa5410d1b0419e704874eb605fb
m_Address: Assets/Content/Audio/BGM/bgm_ready2.ogg
m_ReadOnly: 0
m_SerializedLabels: []
FlaggedDuringContentUpdateRestriction: 0

View File

@ -27,11 +27,6 @@ MonoBehaviour:
m_ReadOnly: 0
m_SerializedLabels: []
FlaggedDuringContentUpdateRestriction: 0
- m_GUID: d27ee423a53e6b94891394a4ae6039de
m_Address: Assets/Content/Prefabs/Effects/Hero
m_ReadOnly: 0
m_SerializedLabels: []
FlaggedDuringContentUpdateRestriction: 0
- m_GUID: 4c71f1aa754281c4dae11f43392a01c4
m_Address: Assets/Content/Prefabs/Effects/Monster
m_ReadOnly: 0
@ -62,6 +57,41 @@ MonoBehaviour:
m_ReadOnly: 0
m_SerializedLabels: []
FlaggedDuringContentUpdateRestriction: 0
- m_GUID: 16e108f976965b74e81906c1f45fe43a
m_Address: Assets/Content/Prefabs/Effects/Hero/Acolyte
m_ReadOnly: 0
m_SerializedLabels: []
FlaggedDuringContentUpdateRestriction: 0
- m_GUID: 0aa89de3067c45e458b01ad4bf8df2d5
m_Address: Assets/Content/Prefabs/Effects/Hero/Archer
m_ReadOnly: 0
m_SerializedLabels: []
FlaggedDuringContentUpdateRestriction: 0
- m_GUID: 9229299251df8ff498104dc32f8aa815
m_Address: Assets/Content/Prefabs/Effects/Hero/Common
m_ReadOnly: 0
m_SerializedLabels: []
FlaggedDuringContentUpdateRestriction: 0
- m_GUID: f696dbb87b1e21043860320115b353d3
m_Address: Assets/Content/Prefabs/Effects/Hero/CrossAssassin
m_ReadOnly: 0
m_SerializedLabels: []
FlaggedDuringContentUpdateRestriction: 0
- m_GUID: 2ee6cdc4cefb4334da749e91847a245f
m_Address: Assets/Content/Prefabs/Effects/Hero/Master
m_ReadOnly: 0
m_SerializedLabels: []
FlaggedDuringContentUpdateRestriction: 0
- m_GUID: 307d91904d9999d4e93d443747c774b7
m_Address: Assets/Content/Prefabs/Effects/Hero/Novice
m_ReadOnly: 0
m_SerializedLabels: []
FlaggedDuringContentUpdateRestriction: 0
- m_GUID: fb13e4649950b3543a7ec4f0dd42f430
m_Address: Assets/Content/Prefabs/Effects/Hero/Sword
m_ReadOnly: 0
m_SerializedLabels: []
FlaggedDuringContentUpdateRestriction: 0
m_ReadOnly: 0
m_Settings: {fileID: 11400000, guid: 8b54c61ef06dca34e89fcf16d0b8c4b3, type: 2}
m_SchemaSet:

View File

@ -37,7 +37,7 @@ MonoBehaviour:
m_Id: 309e321e4354b5d45a04154c3ac699dc
m_LoadPath:
m_Id: 908e2dd043316ef429ea068e0a688905
m_BundleMode: 0
m_BundleMode: 1
m_AssetBundleProviderType:
m_AssemblyName: Unity.ResourceManager, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
m_ClassName: UnityEngine.ResourceManagement.ResourceProviders.AssetBundleProvider

View File

@ -37,7 +37,7 @@ MonoBehaviour:
m_Id: 309e321e4354b5d45a04154c3ac699dc
m_LoadPath:
m_Id: 908e2dd043316ef429ea068e0a688905
m_BundleMode: 0
m_BundleMode: 1
m_AssetBundleProviderType:
m_AssemblyName: Unity.ResourceManager, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
m_ClassName: UnityEngine.ResourceManagement.ResourceProviders.AssetBundleProvider

View File

@ -37,7 +37,7 @@ MonoBehaviour:
m_Id: 309e321e4354b5d45a04154c3ac699dc
m_LoadPath:
m_Id: 908e2dd043316ef429ea068e0a688905
m_BundleMode: 0
m_BundleMode: 1
m_AssetBundleProviderType:
m_AssemblyName: Unity.ResourceManager, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
m_ClassName: UnityEngine.ResourceManagement.ResourceProviders.AssetBundleProvider

View File

@ -37,7 +37,7 @@ MonoBehaviour:
m_Id: 309e321e4354b5d45a04154c3ac699dc
m_LoadPath:
m_Id: 908e2dd043316ef429ea068e0a688905
m_BundleMode: 0
m_BundleMode: 1
m_AssetBundleProviderType:
m_AssemblyName: Unity.ResourceManager, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
m_ClassName: UnityEngine.ResourceManagement.ResourceProviders.AssetBundleProvider

View File

@ -37,7 +37,7 @@ MonoBehaviour:
m_Id: 309e321e4354b5d45a04154c3ac699dc
m_LoadPath:
m_Id: 908e2dd043316ef429ea068e0a688905
m_BundleMode: 0
m_BundleMode: 1
m_AssetBundleProviderType:
m_AssemblyName: Unity.ResourceManager, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
m_ClassName: UnityEngine.ResourceManagement.ResourceProviders.AssetBundleProvider

View File

@ -37,7 +37,7 @@ MonoBehaviour:
m_Id: 309e321e4354b5d45a04154c3ac699dc
m_LoadPath:
m_Id: 908e2dd043316ef429ea068e0a688905
m_BundleMode: 1
m_BundleMode: 0
m_AssetBundleProviderType:
m_AssemblyName: Unity.ResourceManager, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
m_ClassName: UnityEngine.ResourceManagement.ResourceProviders.AssetBundleProvider

View File

@ -17,8 +17,183 @@ MonoBehaviour:
m_SerializedData: []
m_GUID: ad63b870ac04d184fb3c1bf27024d47d
m_SerializeEntries:
- m_GUID: e88962e0e0ea0fe4fa01fa4d63693dd3
m_Address: Assets/Content/Audio/UI
- m_GUID: f7147f778e20b4e43bc9603c4faf338e
m_Address: Assets/Content/Audio/UI/0096.ogg
m_ReadOnly: 0
m_SerializedLabels: []
FlaggedDuringContentUpdateRestriction: 0
- m_GUID: 722db7d060b60a74c9c203a531707c5f
m_Address: Assets/Content/Audio/UI/Fx_LevelUp.ogg
m_ReadOnly: 0
m_SerializedLabels: []
FlaggedDuringContentUpdateRestriction: 0
- m_GUID: b6970dceb4d95c345a0a19dc3cbbe52f
m_Address: Assets/Content/Audio/UI/Ink.ogg
m_ReadOnly: 0
m_SerializedLabels: []
FlaggedDuringContentUpdateRestriction: 0
- m_GUID: 9f4fd380935495b4d94848d2ad2a3a8e
m_Address: Assets/Content/Audio/UI/Screenshot.ogg
m_ReadOnly: 0
m_SerializedLabels: []
FlaggedDuringContentUpdateRestriction: 0
- m_GUID: 7c33b081eb05b50448fe9a109b4c3a25
m_Address: Assets/Content/Audio/UI/UI_Back.ogg
m_ReadOnly: 0
m_SerializedLabels: []
FlaggedDuringContentUpdateRestriction: 0
- m_GUID: 7fd888fa8c731c64db3b641d73ce1aa3
m_Address: Assets/Content/Audio/UI/UI_BattleStart.ogg
m_ReadOnly: 0
m_SerializedLabels: []
FlaggedDuringContentUpdateRestriction: 0
- m_GUID: 5ca087d96f190d14e867e9e9b3ea6929
m_Address: Assets/Content/Audio/UI/UI_Cancle.ogg
m_ReadOnly: 0
m_SerializedLabels: []
FlaggedDuringContentUpdateRestriction: 0
- m_GUID: 5b6b41edb2735e2468469c19e0314a0a
m_Address: Assets/Content/Audio/UI/UI_Char_Remove.ogg
m_ReadOnly: 0
m_SerializedLabels: []
FlaggedDuringContentUpdateRestriction: 0
- m_GUID: af409536af3a59342a35972ee87da6b3
m_Address: Assets/Content/Audio/UI/UI_Char_Set.ogg
m_ReadOnly: 0
m_SerializedLabels: []
FlaggedDuringContentUpdateRestriction: 0
- m_GUID: adae29f1e711ff74badb00a42f5dcc25
m_Address: Assets/Content/Audio/UI/UI_Click.ogg
m_ReadOnly: 0
m_SerializedLabels: []
FlaggedDuringContentUpdateRestriction: 0
- m_GUID: e191f6001ca11e449a379afa8e620e42
m_Address: Assets/Content/Audio/UI/UI_Click_Cancel.ogg
m_ReadOnly: 0
m_SerializedLabels: []
FlaggedDuringContentUpdateRestriction: 0
- m_GUID: f9a749dd35f16d94facdaf9cb383455d
m_Address: Assets/Content/Audio/UI/UI_Click_Yes.ogg
m_ReadOnly: 0
m_SerializedLabels: []
FlaggedDuringContentUpdateRestriction: 0
- m_GUID: e94d180249e0fa348888f35e1535c7d1
m_Address: Assets/Content/Audio/UI/UI_Enhance.ogg
m_ReadOnly: 0
m_SerializedLabels: []
FlaggedDuringContentUpdateRestriction: 0
- m_GUID: 225a81bbc1167cb488aa59f1b3b23869
m_Address: Assets/Content/Audio/UI/UI_Equip.ogg
m_ReadOnly: 0
m_SerializedLabels: []
FlaggedDuringContentUpdateRestriction: 0
- m_GUID: e50d6ba3d482ec04c9c621ebf9bd1fd9
m_Address: Assets/Content/Audio/UI/UI_GetReward.ogg
m_ReadOnly: 0
m_SerializedLabels: []
FlaggedDuringContentUpdateRestriction: 0
- m_GUID: 511de02cd3959254984b78b1ed2689fb
m_Address: Assets/Content/Audio/UI/UI_HeroDown.ogg
m_ReadOnly: 0
m_SerializedLabels: []
FlaggedDuringContentUpdateRestriction: 0
- m_GUID: a1223f1a771201c489ed248e842fadba
m_Address: Assets/Content/Audio/UI/UI_HeroUP.ogg
m_ReadOnly: 0
m_SerializedLabels: []
FlaggedDuringContentUpdateRestriction: 0
- m_GUID: 40feade126853ef4a820bb26ef76b68e
m_Address: Assets/Content/Audio/UI/UI_Icon.ogg
m_ReadOnly: 0
m_SerializedLabels: []
FlaggedDuringContentUpdateRestriction: 0
- m_GUID: f77cfde629cf977458e4fdc7e09f1f11
m_Address: Assets/Content/Audio/UI/UI_Inventory_Open.ogg
m_ReadOnly: 0
m_SerializedLabels: []
FlaggedDuringContentUpdateRestriction: 0
- m_GUID: 7cb69c660c5f2ae4cb6da3bc999f0784
m_Address: Assets/Content/Audio/UI/UI_LevelUp.ogg
m_ReadOnly: 0
m_SerializedLabels: []
FlaggedDuringContentUpdateRestriction: 0
- m_GUID: dd0f0f0bd32f94142a80f4869042e18a
m_Address: Assets/Content/Audio/UI/UI_Login.ogg
m_ReadOnly: 0
m_SerializedLabels: []
FlaggedDuringContentUpdateRestriction: 0
- m_GUID: a9e69de56460c4a428d23eedd708c16e
m_Address: Assets/Content/Audio/UI/UI_Notice.ogg
m_ReadOnly: 0
m_SerializedLabels: []
FlaggedDuringContentUpdateRestriction: 0
- m_GUID: eb3eea9986e21224fbfff409874ca8f4
m_Address: Assets/Content/Audio/UI/UI_OpenBag.ogg
m_ReadOnly: 0
m_SerializedLabels: []
FlaggedDuringContentUpdateRestriction: 0
- m_GUID: 0407cf63b3786d844bf55e700a24d77d
m_Address: Assets/Content/Audio/UI/UI_OpenShop.ogg
m_ReadOnly: 0
m_SerializedLabels: []
FlaggedDuringContentUpdateRestriction: 0
- m_GUID: 1a8832ef4075424429c037011db59b8e
m_Address: Assets/Content/Audio/UI/UI_Sell_Yes.ogg
m_ReadOnly: 0
m_SerializedLabels: []
FlaggedDuringContentUpdateRestriction: 0
- m_GUID: 8c979569c6f7bdf4bbf32f4cb028ab4a
m_Address: Assets/Content/Audio/UI/UI_Tab_Click.ogg
m_ReadOnly: 0
m_SerializedLabels: []
FlaggedDuringContentUpdateRestriction: 0
- m_GUID: 9079a6ec926335e48a67f3e9a5260906
m_Address: Assets/Content/Audio/UI/UI_Tips.ogg
m_ReadOnly: 0
m_SerializedLabels: []
FlaggedDuringContentUpdateRestriction: 0
- m_GUID: a46826325b9addc4cb9edaa1b61f6c7b
m_Address: Assets/Content/Audio/UI/UI_complete.ogg
m_ReadOnly: 0
m_SerializedLabels: []
FlaggedDuringContentUpdateRestriction: 0
- m_GUID: 763776aae56474e4fb1439db65118fc4
m_Address: Assets/Content/Audio/UI/UI_popup.ogg
m_ReadOnly: 0
m_SerializedLabels: []
FlaggedDuringContentUpdateRestriction: 0
- m_GUID: 17c78f48ffc34fe48b143ee402112bfb
m_Address: Assets/Content/Audio/UI/UI_popup1.ogg
m_ReadOnly: 0
m_SerializedLabels: []
FlaggedDuringContentUpdateRestriction: 0
- m_GUID: 52f00098e7ddfd44ca0b3db3831c00b4
m_Address: Assets/Content/Audio/UI/UI_refinefailed.ogg
m_ReadOnly: 0
m_SerializedLabels: []
FlaggedDuringContentUpdateRestriction: 0
- m_GUID: 7e0cb7fdd9fdaf6439932852d66c146e
m_Address: Assets/Content/Audio/UI/UI_refinesuccess.ogg
m_ReadOnly: 0
m_SerializedLabels: []
FlaggedDuringContentUpdateRestriction: 0
- m_GUID: 3607e69eb6d7a434e846135111a0efdd
m_Address: Assets/Content/Audio/UI/UI_skillshow.ogg
m_ReadOnly: 0
m_SerializedLabels: []
FlaggedDuringContentUpdateRestriction: 0
- m_GUID: a89dc550c822845458ceb049b1710483
m_Address: Assets/Content/Audio/UI/UI_warning.ogg
m_ReadOnly: 0
m_SerializedLabels: []
FlaggedDuringContentUpdateRestriction: 0
- m_GUID: fcd25628b4913de49939c269269cbdbf
m_Address: Assets/Content/Audio/UI/UI_warning1.ogg
m_ReadOnly: 0
m_SerializedLabels: []
FlaggedDuringContentUpdateRestriction: 0
- m_GUID: 44b9946c8fb7eda4cb467a635b21a728
m_Address: Assets/Content/Audio/UI/UI_xuzhang.ogg
m_ReadOnly: 0
m_SerializedLabels: []
FlaggedDuringContentUpdateRestriction: 0

View File

@ -4,6 +4,7 @@ using System.IO;
using System.IO.Compression;
using System.Security.Cryptography;
using System.Text;
using ICSharpCode.SharpZipLib.Zip;
using UnityEditor;
using UnityEngine;
@ -28,48 +29,6 @@ public class RoTool : EditorWindow
AssetDatabase.Refresh();
}
static void MergeFiles(string directory, string outputFile)
{
if (!Directory.Exists(directory))
{
Debug.LogError("Directory does not exist: " + directory);
return;
}
// 获取目录下的所有文件
var srcFiles = getAllFilesPathEX(directory);
// 检查输出路径是否有效,如果目录不存在则创建
string outputDirectory = Path.GetDirectoryName(outputFile);
if (!Directory.Exists(outputDirectory))
{
Directory.CreateDirectory(outputDirectory);
}
// 使用 StreamWriter 合并文件
using (StreamWriter writer = new StreamWriter(outputFile, false))
{
foreach (string file in srcFiles)
{
// 读取每个文件的内容
var fileName = Path.GetFileName(file);
Debug.Log(file);
string fileContent = File.ReadAllText(file);
// 写入文件名
writer.WriteLine(fileName);
// 写入文件内容
writer.WriteLine(fileContent);
// 写入分隔符
writer.WriteLine(Constants.merge_files_split);
}
}
Debug.Log("Files merged successfully into: " + outputFile);
}
private static HashSet<string> s_ValidExtMap = new HashSet<string>() { ".prefab", ".txt", ".xml", ".txt", ".lua", ".csv", ".ogg", ".wav", ".ttf", ".bytes", ".pb" };
private static List<string> getAllFilesPathEX(string path, string searchPattern = "*.*", SearchOption searchOption = SearchOption.AllDirectories)
{
@ -107,31 +66,28 @@ public class RoTool : EditorWindow
// 创建一个ZIP文件并开始写入
using (FileStream zipFile = new FileStream(zipPath, FileMode.Create))
{
using (ZipArchive zipArchive = new ZipArchive(zipFile, ZipArchiveMode.Create))
using (ZipOutputStream zipStream = new ZipOutputStream(zipFile))
{
zipStream.SetLevel(6);
zipStream.Password = Constants.ZipPW;
foreach (var filePath in files)
{
if (File.Exists(filePath))
{
// 获取文件的名称(不带路径)
string fileName = Path.GetFileName(filePath);
FileInfo fileInfo = new FileInfo(filePath);
byte[] fileBytes = File.ReadAllBytes(filePath);
byte[] aseFileBytes = CommonUtil.Encrypt(fileBytes);
// 将文件添加到ZIP档案
ZipArchiveEntry entry = zipArchive.CreateEntry(fileName);
using (Stream entryStream = entry.Open())
{
entryStream.Write(aseFileBytes, 0, aseFileBytes.Length);
}
// using (FileStream fileStream = new FileStream(filePath, FileMode.Open))
// {
// fileStream.CopyTo(entryStream);
// }
//byte[] aseFileBytes = CommonUtil.Encrypt(fileBytes);
Debug.Log($"Added file: {fileName} to the ZIP archive.");
// 将文件添加到ZIP档案
ZipEntry entry = new ZipEntry(fileName) {
//DateTime = fileInfo.LastWriteTime,
//AESKeySize = 128 // 使用 AES 256 位加密
};
zipStream.PutNextEntry(entry);
zipStream.Write(fileBytes, 0, fileBytes.Length);
zipStream.CloseEntry();
}
else
{

View File

@ -155,7 +155,7 @@ public static class Constants
public const string enemy_actor_born_point = "EnemyActorBornPoint";
public const string design_go = "Design";
public const string coming_camera_target = "Camera_on-off";
public const string merge_files_split = "%[~!@#$%split~!@#$%]%";
public const string ZipPW = "ADFGBSXCODFGBSXC";
public const int c_delay_skillcasting_time = 2;

View File

@ -239,23 +239,11 @@ public class ConfigMgr : Singleton<ConfigMgr>
private void UnzipXmlFiles(byte[] zipBytes)
{
using (MemoryStream ms = new MemoryStream(zipBytes))
CommonUtil.UnzipFiles(zipBytes, (fileName, fileBytes) =>
{
using (ZipArchive archive = new ZipArchive(ms, ZipArchiveMode.Read))
{
foreach (var entry in archive.Entries)
{
var fileName = entry.Name;
using (var entryStream = entry.Open())
{
byte[] fileBytes = new byte[entry.Length];
entryStream.Read(fileBytes, 0, fileBytes.Length);
string text = Encoding.UTF8.GetString(UnicodeUtil.ConvertToNonBOM(CommonUtil.Decrypt(fileBytes)));
mXmlConfigDict.Add(Path.GetFileNameWithoutExtension(fileName), text);
}
}
}
}
string text = Encoding.UTF8.GetString(UnicodeUtil.ConvertToNonBOM(fileBytes));
mXmlConfigDict.Add(Path.GetFileNameWithoutExtension(fileName), text);
});
m_bInitXMLFinished = true;
CheckCfgOk();
}
@ -264,40 +252,28 @@ public class ConfigMgr : Singleton<ConfigMgr>
{
string keyword = "LanguagePackage";
string keywordname = string.Format("{0}{1}", keyword, CurLangKey);
string curname = string.Empty;
using (MemoryStream ms = new MemoryStream(zipBytes))
CommonUtil.UnzipFiles(zipBytes, (fileName, fileBytes) =>
{
using (ZipArchive archive = new ZipArchive(ms, ZipArchiveMode.Read))
string text = Encoding.UTF8.GetString(UnicodeUtil.ConvertToNonBOM(fileBytes));
var curname = Path.GetFileNameWithoutExtension(fileName);
if (curname.Contains(keyword) && !curname.Equals(keywordname) || text.Length <= 0)
{
foreach (var entry in archive.Entries)
{
var fileName = entry.Name;
using (var entryStream = entry.Open())
{
byte[] fileBytes = new byte[entry.Length];
entryStream.Read(fileBytes, 0, fileBytes.Length);
string text = Encoding.UTF8.GetString(UnicodeUtil.ConvertToNonBOM(CommonUtil.Decrypt(fileBytes)));
curname = Path.GetFileNameWithoutExtension(fileName);
if (curname.Contains(keyword) && !curname.Equals(keywordname) || text.Length <= 0)
continue;
Dictionary<string, Dictionary<string, string>> ts = getData(curname, text);
if (ConfigDictionary.ContainsKey(curname))
{
ConfigDictionary[curname] = ts;
}
else
{
ConfigDictionary.Add(curname, ts);
}
}
}
return;
}
}
Dictionary<string, Dictionary<string, string>> ts = getData(curname, text);
if (ConfigDictionary.ContainsKey(curname))
{
ConfigDictionary[curname] = ts;
}
else
{
ConfigDictionary.Add(curname, ts);
}
});
m_bInitCSVFinished = true;
keyword = string.Empty;
keywordname = string.Empty;
curname = string.Empty;
CheckCfgOk();
}

View File

@ -7,6 +7,7 @@ using System.Collections.Generic;
using System.IO.Compression;
using Cysharp.Threading.Tasks;
public class LuaMgr : SingletonMono<LuaMgr>
{
private Dictionary<string, byte[]> LuaDic = new Dictionary<string, byte[]>();
@ -56,56 +57,18 @@ public class LuaMgr : SingletonMono<LuaMgr>
UnzipLuaFiles(lua_zip_data);
var pb_zip_data = await AssetsMgr.Instance.LoadLocalFileData(Application.streamingAssetsPath + "/" + Constants.LuaPbDirMergeFile);
UnzipPbFiles(pb_zip_data);
// Resources.LoadAsync<TextAsset>("files_tolua").completed += op =>
// {
// ResourceRequest request = op as ResourceRequest;
// var textAsset = request.asset as TextAsset;
// var paths = textAsset.text.Split(',');
// ResourceMgr.Instance.LoadAsset<List<TextAsset>>(OnCallBack, Constants.ABToLuaDir, paths);
// };
// Resources.LoadAsync<TextAsset>("files_lua").completed += op =>
// {
// ResourceRequest request = op as ResourceRequest;
// var textAsset = request.asset as TextAsset;
// var paths = textAsset.text.Split(',');
// ResourceMgr.Instance.LoadAsset<List<TextAsset>>(OnCallBack, Constants.ABLuaLogicDir, paths);
// };
// Resources.LoadAsync<TextAsset>("files_pb").completed += op =>
// {
// ResourceRequest request = op as ResourceRequest;
// var textAsset = request.asset as TextAsset;
// var paths = textAsset.text.Split(',');
// ResourceMgr.Instance.LoadAsset<List<TextAsset>>(OnLoadPbCallback, Constants.ABLuaPbDir, paths);
// };
//ResourceMgr.Instance.LoadLuaAsset(OnCallBack, Constants.ABLuaDir);
//ResourceMgr.Instance.LoadLuaAsset(OnCallBack, Constants.ABLuaLogicDir);
//ResourceMgr.Instance.LoadLuaAsset(OnLoadPbCallback, Constants.ABLuaPbDir);
}
private void UnzipLuaFiles(byte[] zipBytes)
{
using (MemoryStream ms = new MemoryStream(zipBytes))
CommonUtil.UnzipFiles(zipBytes, (fileName, fileBytes) =>
{
using (ZipArchive archive = new ZipArchive(ms, ZipArchiveMode.Read))
if (LuaDic.ContainsKey(fileName))
{
foreach (var entry in archive.Entries)
{
// 处理每个文件
Debug.Log($"Extracting: {entry.FullName}, {entry.Name}");
var fileName = entry.Name;
using (var entryStream = entry.Open())
{
byte[] fileBytes = new byte[entry.Length];
entryStream.Read(fileBytes, 0, fileBytes.Length);
if (LuaDic.ContainsKey(fileName))
{
LuaDic.Remove(fileName);
}
LuaDic.Add(fileName, CommonUtil.Decrypt(fileBytes));
}
}
LuaDic.Remove(fileName);
}
}
LuaDic.Add(fileName, fileBytes);
});
LoadCount++;
if (LoadCount == LuaDirCount)
{
@ -115,31 +78,15 @@ public class LuaMgr : SingletonMono<LuaMgr>
private void UnzipPbFiles(byte[] zipBytes)
{
using (MemoryStream ms = new MemoryStream(zipBytes))
CommonUtil.UnzipFiles(zipBytes, (fileName, fileBytes) =>
{
using (ZipArchive archive = new ZipArchive(ms, ZipArchiveMode.Read))
if (fileName.Contains(".lua")) return;
if (luaPbDic.ContainsKey(fileName))
{
foreach (var entry in archive.Entries)
{
var fileName = entry.Name;
using (var entryStream = entry.Open())
{
byte[] fileBytes = new byte[entry.Length];
entryStream.Read(fileBytes, 0, fileBytes.Length);
if (fileName.Contains(".lua"))
{
continue;
}
if (luaPbDic.ContainsKey(fileName))
{
luaPbDic.Remove(fileName);
}
luaPbDic.Add(fileName, CommonUtil.Decrypt(fileBytes));
}
}
luaPbDic.Remove(fileName);
}
}
luaPbDic.Add(fileName, fileBytes);
});
LoadCount++;
if (LoadCount == LuaDirCount)
{

View File

@ -1,4 +1,5 @@
using UnityEngine;
using System;
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
using System.IO;
@ -345,4 +346,28 @@ public static class CommonUtil
}
}
}
public static void UnzipFiles(byte[] zipBytes, Action<string,byte[]> onFileUnzipCallback)
{
Debug.Log("Starting unzipping files ...");
using (MemoryStream ms = new MemoryStream(zipBytes))
{
using (ICSharpCode.SharpZipLib.Zip.ZipFile zipFile = new ICSharpCode.SharpZipLib.Zip.ZipFile(ms))
{
zipFile.Password = Constants.ZipPW;
foreach (ICSharpCode.SharpZipLib.Zip.ZipEntry entry in zipFile)
{
if (!entry.IsFile) continue;
var fileName = entry.Name;
Debug.Log(fileName);
using (Stream zipStream = zipFile.GetInputStream(entry))
{
byte[] fileBytes = new byte[entry.Size];
zipStream.Read(fileBytes, 0, fileBytes.Length);
onFileUnzipCallback(fileName, fileBytes);
}
}
}
}
}
}

View File

@ -23,10 +23,16 @@ def list_files_relative_path(input_dir, ignore):
if __name__ == "__main__":
xml_input_directory = r"C:\Users\letme\Desktop\Work\LeGang\ro-webgl\Assets\Content\Xml"
xml_output_file_path = r"C:\Users\letme\Desktop\Work\LeGang\ro-webgl\Assets\Resources\files_xml.txt"
result = list_files_relative_path(xml_input_directory, "*")
result = list_files_relative_path(xml_input_directory, "Skill")
with open(xml_output_file_path, 'w', encoding='utf-8') as f:
f.write(result)
skill_input_directory = r"C:\Users\letme\Desktop\Work\LeGang\ro-webgl\Assets\Content\Xml\Skill"
skill_output_file_path = r"C:\Users\letme\Desktop\Work\LeGang\ro-webgl\Assets\Resources\files_skill.txt"
result = list_files_relative_path(skill_input_directory, "*")
with open(skill_output_file_path, 'w', encoding='utf-8') as f:
f.write(result)
csv_input_directory = r"C:\Users\letme\Desktop\Work\LeGang\ro-webgl\Assets\Content\Config"
csv_output_file_path = r"C:\Users\letme\Desktop\Work\LeGang\ro-webgl\Assets\Resources\files_csv.txt"
result = list_files_relative_path(csv_input_directory, "*")