冲突同步

master
fy 2026-04-22 15:49:23 +08:00
commit 368adb556d
63 changed files with 391 additions and 236 deletions

View File

@ -2,215 +2,28 @@
"libview.firstColumnWidth": 356, "libview.firstColumnWidth": 356,
"libview.iconScale": 0, "libview.iconScale": 0,
"doc.openedDocs": [ "doc.openedDocs": [
"ui://yzaioi79f55qwa", "ui://27vd145bhxjc7i4q",
"ui://m7iejg46tqi8hwa", "ui://kplym8mus9wxa",
"ui://m7iejg46hsbhhjn",
"ui://m7iejg46jgh8hwv",
"ui://m7iejg4610snh5j",
"ui://3z9lj55vjokmft",
"ui://b50sd5s6s9wx7",
"ui://b50sd5s6s9wxa",
"ui://visk5g30gq7m2c",
"ui://s63l0suw6cpqv",
"ui://s63l0suw6cpqt",
"ui://425x67nrs9wx7",
"ui://kplym8mus9wx7",
"ui://fnuxqeflnrnod", "ui://fnuxqeflnrnod",
"ui://egnzysm7ffp36a",
"ui://egnzysm7ffp370",
"ui://27vd145blwcl28",
"ui://27vd145bcjli6",
"ui://27vd145bimywcd5",
"ui://bx1t0boos9wx8",
"ui://v2hilfzbgq7mde",
"ui://ypulwxjhl9mn14",
"ui://oubpz2r2ofil7k",
"ui://k15boclkl9mn14",
"ui://v0j9abjygq7med",
"ui://3z9lj55vjokmfg",
"ui://4skil1l6piv91ny",
"ui://v0j9abjygq7mdf",
"ui://v0j9abjygq7mdl",
"ui://v0j9abjygq7md3",
"ui://v0j9abjygq7md1",
"ui://v0j9abjygq7mct",
"ui://v0j9abjygq7mcu",
"ui://4skil1l6uwvl1qp",
"ui://4skil1l6piv91mk",
"ui://x3mp2cn6xvhr3r",
"ui://4skil1l6piv91o7",
"ui://4skil1l6piv91o5",
"ui://3n2top74kpmgq4",
"ui://27vd145bo95k7i4p",
"ui://27vd145bhei77i2g",
"ui://27vd145b7jqkcdl",
"ui://27vd145be2q77i64",
"ui://4skil1l6piv91mg",
"ui://4skil1l6piv91nt",
"ui://442j0uepygxga",
"ui://3n2top74kpmgkd",
"ui://9n9stu2eprgzee",
"ui://awernf6xbazq7n",
"ui://qpsoxvaiprgzee",
"ui://b8jloj2qg8ktcmb",
"ui://3op8sm5eu86s1f",
"ui://niy3ldiwl9mn14",
"ui://5cdldr01qaqf2c",
"ui://3z9lj55vjokmet",
"ui://c7j2rnvqtpf02f", "ui://c7j2rnvqtpf02f",
"ui://y8prev1ms9wx7", "ui://y8prev1ms9wx7",
"ui://3z9lj55vjokm8z", "ui://3z9lj55vjokmft",
"ui://3z9lj55vjokmey", "ui://4skil1l6piv91ny",
"ui://27vd145btjnvcg9", "ui://niy3ldiwl9mny",
"ui://27vd145bn12bcge", "ui://niy3ldiwl9mn19",
"ui://c7j2rnvqtpf03e", "ui://9n9stu2eprgzei",
"ui://visk5g30gq7m30", "ui://9n9stu2eprgzef"
"ui://egnzysm7ffp37r",
"ui://visk5g30gq7m43",
"ui://m7iejg46f6brhww",
"ui://m7iejg46wbjh7ica",
"ui://m7iejg46j1207i2r",
"ui://m7iejg46j1207i2o",
"ui://0khx14are0py2",
"ui://v2hilfzbgq7mh7",
"ui://oubpz2r2i2djgl",
"ui://3n2top74kpmgp4",
"ui://9n9stu2eprgzgj",
"ui://awernf6xbazqbp",
"ui://qpsoxvaiprgzgj",
"ui://b8jloj2qprgzgj",
"ui://2d9xdj6zl0lzb",
"ui://lx6k641gajzhoe",
"ui://5cdldr01qaqfdr",
"ui://yzaioi79wyal8n",
"ui://v6yvqp7wwyal8n",
"ui://35sf1c1fr05ed8",
"ui://m7iejg46kwi0hlb",
"ui://m7iejg46jr1l7i3c",
"ui://yzaioi79f55qw5",
"ui://yzaioi79f55qvx",
"ui://yzaioi79f55qvw",
"ui://35sf1c1fr05e8u",
"ui://35sf1c1fr05e9m",
"ui://35sf1c1fr05eae",
"ui://35sf1c1fr05e76",
"ui://v6yvqp7wf55qvw",
"ui://35sf1c1fr05e5z",
"ui://35sf1c1fr05eb",
"ui://5cdldr01qaqf9c",
"ui://5cdldr01qaqf6x",
"ui://5cdldr01qaqf7q",
"ui://5cdldr01qaqf7g",
"ui://5cdldr01qaqf71",
"ui://3n2top74kpmgp5",
"ui://5cdldr01qaqf4w",
"ui://5cdldr01qaqf59",
"ui://5cdldr01qaqfa4",
"ui://v6yvqp7wf55qwa",
"ui://v6yvqp7wf55qw4",
"ui://v6yvqp7wfgao1dk",
"ui://c7j2rnvqtpf08x",
"ui://fnuxqeflkllg1x",
"ui://egnzysm7ffp3b2",
"ui://v2hilfzbgq7me6",
"ui://ypulwxjhl9mn37",
"ui://k15boclkl9mn37",
"ui://oubpz2r2ofil8x",
"ui://442j0uepdafga8",
"ui://3n2top74kpmgmh",
"ui://9n9stu2eprgzf0",
"ui://awernf6xbazq90",
"ui://qpsoxvaiprgzf0",
"ui://b8jloj2qprgzf0",
"ui://3op8sm5eu86s3p",
"ui://niy3ldiwl9mn37",
"ui://3z9lj55vjokmwr",
"ui://3z9lj55vjokm7l",
"ui://v0j9abjygq7ms2",
"ui://v0j9abjygq7m8f",
"ui://4skil1l6r6qo1kc",
"ui://4skil1l6ms5spy",
"ui://5cdldr01qaqf61",
"ui://5cdldr01qaqfb"
],
"test.device": "Huawei Mate20 Pro",
"canvasColor": 10066329,
"auxline2": true,
"doc.activeDoc": "ui://3z9lj55vjokmft",
"libview.twoColumn": false,
"libview.expandedNodes": [
"l0ds4ys6",
"/",
"niy3ldiw",
"/",
"niy3ldiw",
"/component/",
"niy3ldiw",
"/component/clearing/",
"0khx14ar",
"/",
"3z9lj55v",
"/",
"3z9lj55v",
"/Main_style_2/",
"3z9lj55v",
"/Main_style_2/card/",
"3z9lj55v",
"/Main_style_2/card/card_mark/",
"3z9lj55v",
"/Main_style_2/card/card_mark/images/",
"3z9lj55v",
"/Main_style_2/ting/",
"3z9lj55v",
"/Main_style_2/turn/",
"3z9lj55v",
"/component/",
"3z9lj55v",
"/component/setting/",
"3z9lj55v",
"/component/setting/changeBG/",
"3z9lj55v",
"/image/",
"3z9lj55v",
"/images/",
"3z9lj55v",
"/images/bg/",
"5cdldr01",
"/",
"5cdldr01",
"/component/",
"5cdldr01",
"/component/Main/",
"5cdldr01",
"/component/option/",
"5cdldr01",
"/component/record/",
"5cdldr01",
"/component/result/",
"5cdldr01",
"/component/result/component/",
"5cdldr01",
"/component/result/images/",
"5cdldr01",
"/component/tips/",
"5cdldr01",
"/image/",
"5cdldr01",
"/image/main_2/",
"5cdldr01",
"/images/",
"yzaioi79",
"/",
"v6yvqp7w",
"/",
"35sf1c1f",
"/",
"m7iejg46",
"/"
], ],
"auxline1": true, "auxline1": true,
"canvasColor": 10066329,
"auxline2": true,
"doc.activeDoc": "ui://9n9stu2eprgzef",
"libview.twoColumn": false,
"libview.expandedNodes": [
"27vd145b",
"/"
],
"snapToGrid": true, "snapToGrid": true,
"test.orientation": "landscape",
"backgroundColor": 6710886, "backgroundColor": 6710886,
"libview.currentGroup": "", "libview.currentGroup": "",
"gridSize": 30, "gridSize": 30,

View File

@ -88,5 +88,5 @@ TextureImporter:
pSDRemoveMatte: 0 pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0 pSDShowRemoveMatteOption: 0
userData: userData:
assetBundleName: assetBundleName: base/common/af187115a4824290240734622129b80b
assetBundleVariant: assetBundleVariant:

View File

@ -88,5 +88,5 @@ TextureImporter:
pSDRemoveMatte: 0 pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0 pSDShowRemoveMatteOption: 0
userData: userData:
assetBundleName: assetBundleName: base/lobby/4a425335ab0e1c246f741e6da62b244f
assetBundleVariant: assetBundleVariant:

View File

@ -88,5 +88,5 @@ TextureImporter:
pSDRemoveMatte: 0 pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0 pSDShowRemoveMatteOption: 0
userData: userData:
assetBundleName: assetBundleName: base/lobby/4a425335ab0e1c246f741e6da62b244f
assetBundleVariant: assetBundleVariant:

View File

@ -88,5 +88,5 @@ TextureImporter:
pSDRemoveMatte: 0 pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0 pSDShowRemoveMatteOption: 0
userData: userData:
assetBundleName: assetBundleName: base/main_majiang/d2fa434d27dc07bf09395dc32491060b
assetBundleVariant: assetBundleVariant:

View File

@ -88,5 +88,5 @@ TextureImporter:
pSDRemoveMatte: 0 pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0 pSDShowRemoveMatteOption: 0
userData: userData:
assetBundleName: assetBundleName: base/main_majiang/d2fa434d27dc07bf09395dc32491060b
assetBundleVariant: assetBundleVariant:

View File

@ -88,5 +88,5 @@ TextureImporter:
pSDRemoveMatte: 0 pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0 pSDShowRemoveMatteOption: 0
userData: userData:
assetBundleName: assetBundleName: base/main_majiang/d2fa434d27dc07bf09395dc32491060b
assetBundleVariant: assetBundleVariant:

View File

@ -88,5 +88,5 @@ TextureImporter:
pSDRemoveMatte: 0 pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0 pSDShowRemoveMatteOption: 0
userData: userData:
assetBundleName: assetBundleName: base/main_majiang/d2fa434d27dc07bf09395dc32491060b
assetBundleVariant: assetBundleVariant:

View File

@ -88,5 +88,5 @@ TextureImporter:
pSDRemoveMatte: 0 pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0 pSDShowRemoveMatteOption: 0
userData: userData:
assetBundleName: assetBundleName: base/main_majiang/d2fa434d27dc07bf09395dc32491060b
assetBundleVariant: assetBundleVariant:

View File

@ -88,5 +88,5 @@ TextureImporter:
pSDRemoveMatte: 0 pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0 pSDShowRemoveMatteOption: 0
userData: userData:
assetBundleName: assetBundleName: base/main_majiang/d2fa434d27dc07bf09395dc32491060b
assetBundleVariant: assetBundleVariant:

View File

@ -88,5 +88,5 @@ TextureImporter:
pSDRemoveMatte: 0 pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0 pSDShowRemoveMatteOption: 0
userData: userData:
assetBundleName: assetBundleName: base/main_majiang/d2fa434d27dc07bf09395dc32491060b
assetBundleVariant: assetBundleVariant:

View File

@ -88,5 +88,5 @@ TextureImporter:
pSDRemoveMatte: 0 pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0 pSDShowRemoveMatteOption: 0
userData: userData:
assetBundleName: assetBundleName: base/main_majiang/d2fa434d27dc07bf09395dc32491060b
assetBundleVariant: assetBundleVariant:

View File

@ -88,5 +88,5 @@ TextureImporter:
pSDRemoveMatte: 0 pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0 pSDShowRemoveMatteOption: 0
userData: userData:
assetBundleName: assetBundleName: base/main_zipai/1b67e95de3db97b52dfe810c7d35f1b7
assetBundleVariant: assetBundleVariant:

View File

@ -88,5 +88,5 @@ TextureImporter:
pSDRemoveMatte: 0 pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0 pSDShowRemoveMatteOption: 0
userData: userData:
assetBundleName: assetBundleName: base/main_zipai/1b67e95de3db97b52dfe810c7d35f1b7
assetBundleVariant: assetBundleVariant:

View File

@ -88,5 +88,5 @@ TextureImporter:
pSDRemoveMatte: 0 pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0 pSDShowRemoveMatteOption: 0
userData: userData:
assetBundleName: assetBundleName: base/main_zipai/1b67e95de3db97b52dfe810c7d35f1b7
assetBundleVariant: assetBundleVariant:

View File

@ -88,5 +88,5 @@ TextureImporter:
pSDRemoveMatte: 0 pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0 pSDShowRemoveMatteOption: 0
userData: userData:
assetBundleName: assetBundleName: base/main_zipai/1b67e95de3db97b52dfe810c7d35f1b7
assetBundleVariant: assetBundleVariant:

View File

@ -88,5 +88,5 @@ TextureImporter:
pSDRemoveMatte: 0 pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0 pSDShowRemoveMatteOption: 0
userData: userData:
assetBundleName: assetBundleName: base/main_zipai/1b67e95de3db97b52dfe810c7d35f1b7
assetBundleVariant: assetBundleVariant:

View File

@ -88,5 +88,5 @@ TextureImporter:
pSDRemoveMatte: 0 pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0 pSDShowRemoveMatteOption: 0
userData: userData:
assetBundleName: assetBundleName: base/newgroup/1876b2140d79b7dc6c2674f954027415
assetBundleVariant: assetBundleVariant:

View File

@ -88,5 +88,5 @@ TextureImporter:
pSDRemoveMatte: 0 pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0 pSDShowRemoveMatteOption: 0
userData: userData:
assetBundleName: assetBundleName: extend/majiang/changsha/d7829e76d3fb928cdbf041d12e51a83b
assetBundleVariant: assetBundleVariant:

View File

@ -88,5 +88,5 @@ TextureImporter:
pSDRemoveMatte: 0 pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0 pSDShowRemoveMatteOption: 0
userData: userData:
assetBundleName: assetBundleName: extend/poker/runfast/4453ac44dfe0b10c314c4b7d0f517f22
assetBundleVariant: assetBundleVariant:

View File

@ -88,5 +88,5 @@ TextureImporter:
pSDRemoveMatte: 0 pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0 pSDShowRemoveMatteOption: 0
userData: userData:
assetBundleName: assetBundleName: extend/poker/runfast/4453ac44dfe0b10c314c4b7d0f517f22
assetBundleVariant: assetBundleVariant:

View File

@ -88,5 +88,5 @@ TextureImporter:
pSDRemoveMatte: 0 pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0 pSDShowRemoveMatteOption: 0
userData: userData:
assetBundleName: assetBundleName: extend/poker/runfast/4453ac44dfe0b10c314c4b7d0f517f22
assetBundleVariant: assetBundleVariant:

View File

@ -88,5 +88,5 @@ TextureImporter:
pSDRemoveMatte: 0 pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0 pSDShowRemoveMatteOption: 0
userData: userData:
assetBundleName: assetBundleName: extend/poker/runfast/4453ac44dfe0b10c314c4b7d0f517f22
assetBundleVariant: assetBundleVariant:

View File

@ -88,5 +88,5 @@ TextureImporter:
pSDRemoveMatte: 0 pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0 pSDShowRemoveMatteOption: 0
userData: userData:
assetBundleName: assetBundleName: extend/poker/runfast/4453ac44dfe0b10c314c4b7d0f517f22
assetBundleVariant: assetBundleVariant:

View File

@ -88,5 +88,5 @@ TextureImporter:
pSDRemoveMatte: 0 pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0 pSDShowRemoveMatteOption: 0
userData: userData:
assetBundleName: assetBundleName: extend/poker/runfast/4453ac44dfe0b10c314c4b7d0f517f22
assetBundleVariant: assetBundleVariant:

View File

@ -88,5 +88,5 @@ TextureImporter:
pSDRemoveMatte: 0 pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0 pSDShowRemoveMatteOption: 0
userData: userData:
assetBundleName: assetBundleName: extend/poker/runfast/4453ac44dfe0b10c314c4b7d0f517f22
assetBundleVariant: assetBundleVariant:

View File

@ -88,5 +88,5 @@ TextureImporter:
pSDRemoveMatte: 0 pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0 pSDShowRemoveMatteOption: 0
userData: userData:
assetBundleName: assetBundleName: extend/poker/runfast/4453ac44dfe0b10c314c4b7d0f517f22
assetBundleVariant: assetBundleVariant:

View File

@ -88,5 +88,5 @@ TextureImporter:
pSDRemoveMatte: 0 pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0 pSDShowRemoveMatteOption: 0
userData: userData:
assetBundleName: assetBundleName: extend/poker/runfast/4453ac44dfe0b10c314c4b7d0f517f22
assetBundleVariant: assetBundleVariant:

View File

@ -88,5 +88,5 @@ TextureImporter:
pSDRemoveMatte: 0 pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0 pSDShowRemoveMatteOption: 0
userData: userData:
assetBundleName: assetBundleName: extend/poker/runfast/4453ac44dfe0b10c314c4b7d0f517f22
assetBundleVariant: assetBundleVariant:

View File

@ -88,5 +88,5 @@ TextureImporter:
pSDRemoveMatte: 0 pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0 pSDShowRemoveMatteOption: 0
userData: userData:
assetBundleName: assetBundleName: extend/poker/runfast/4453ac44dfe0b10c314c4b7d0f517f22
assetBundleVariant: assetBundleVariant:

View File

@ -18,5 +18,5 @@ AudioImporter:
ambisonic: 0 ambisonic: 0
3D: 1 3D: 1
userData: userData:
assetBundleName: assetBundleName: extend/poker/runfast/4453ac44dfe0b10c314c4b7d0f517f22
assetBundleVariant: assetBundleVariant:

View File

@ -18,5 +18,5 @@ AudioImporter:
ambisonic: 0 ambisonic: 0
3D: 1 3D: 1
userData: userData:
assetBundleName: assetBundleName: extend/poker/runfast/4453ac44dfe0b10c314c4b7d0f517f22
assetBundleVariant: assetBundleVariant:

View File

@ -18,5 +18,5 @@ AudioImporter:
ambisonic: 0 ambisonic: 0
3D: 1 3D: 1
userData: userData:
assetBundleName: assetBundleName: extend/poker/runfast/4453ac44dfe0b10c314c4b7d0f517f22
assetBundleVariant: assetBundleVariant:

Binary file not shown.

Before

Width:  |  Height:  |  Size: 148 KiB

After

Width:  |  Height:  |  Size: 1.3 MiB

View File

@ -0,0 +1,141 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEditor;
using System.IO;
using taurus.client;
using taurus.unity;
class ReadAssetBase : Editor
{
private static string baseVersion = "1.0.10";
#if UNITY_IPHONE
static string PACK_PATH = Path.Combine(Path.GetFullPath(Path.Combine(Application.dataPath, "..")), "Pack", "iOS");
#else
static string PACK_PATH = Path.Combine(Path.GetFullPath(Path.Combine(Application.dataPath, "..")), "Pack", "Android32");
#endif
static string READ_PATH = Path.Combine(Application.streamingAssetsPath, "Pack");
static string READ_ZIP = Path.Combine(Application.streamingAssetsPath, "Pack.byte");
static string READ_VERSION = Path.Combine(Application.streamingAssetsPath, "version.txt");
[MenuItem("BuildTools/Read Pack In Local")]
static public void ReadAssetBaseRun()
{
if (!Directory.Exists(PACK_PATH))
{
Debug.LogError("请打包后再运行解压操作");
return;
}
try
{
EditorApplication.LockReloadAssemblies();
EditorUtility.DisplayProgressBar("正在解压资源包中", "请稍候,正在处理资源...", 0f);
if (Directory.Exists(READ_PATH))
{
Directory.Delete(READ_PATH, true);
}
Directory.CreateDirectory(READ_PATH);
if (File.Exists(READ_ZIP))
{
File.Delete(READ_ZIP);
}
if (File.Exists(READ_VERSION))
{
File.Delete(READ_VERSION);
}
string baseString = Path.Combine(Application.streamingAssetsPath , "init2_1.json");
string baseBytes = File.ReadAllText(baseString);
ArrayList baseList = (ArrayList)MiniJSON.Json.Deserialize(baseBytes);
for (int i = 0; i < baseList.Count; i++)
{
var tem = (Hashtable)baseList[i];
string _base_path = Path.Combine("base", tem["name"] as string);
string version = tem["version"] as string;
__UnPack(version, _base_path);
}
string extendString = Path.Combine(Application.streamingAssetsPath, "init1_1.json");
string extendBytes = File.ReadAllText(extendString);
ArrayList extendList = (ArrayList)MiniJSON.Json.Deserialize(extendBytes);
for (int i = 0; i < extendList.Count; i++)
{
var tem = (Hashtable)extendList[i];
string extendBundle = tem["bundle"] as string;
string[] extendNameTem = extendBundle.Split('/');
string _extend_path = Path.Combine(extendNameTem);
string version = tem["version"] as string;
__UnPack(version, _extend_path);
}
string arv = Path.Combine(READ_PATH, string.Format("asset_config{0}.json", baseVersion));
File.WriteAllText(arv, baseBytes);
string rv = Path.Combine(READ_PATH , "version.txt");
File.WriteAllText(rv, baseVersion);
File.WriteAllText(READ_VERSION, baseVersion);
IFilePack zf = null;
zf = new FilePack20(READ_ZIP, PackMode.Write);
zf.PackFile(READ_PATH, ".meta|.manifest");
zf = null;
Directory.Delete(READ_PATH, true);
EditorUtility.DisplayDialog("完成", "处理完毕!", "确定");
}
finally
{
EditorUtility.ClearProgressBar();
EditorApplication.UnlockReloadAssemblies();
}
}
static void __UnPack(string version, string _base_path)
{
try
{
string dir = PACK_PATH;
var zip_path = Path.Combine(dir, _base_path, $"asset_pack{version}.bytes");
if (!File.Exists(zip_path))
{
Debug.LogError("打包文件不完全,请将打包所有资源包");
throw new System.Exception();
}
IFilePack zip = null;
zip = new FilePack20(zip_path, PackMode.Read);
zip.UnPackFile(READ_PATH);
var lua_pack_path = Path.Combine(READ_PATH, "lua_pack");
if (File.Exists(lua_pack_path))
{
var lua_dir = Path.Combine(READ_PATH, "lua/");
if (!Directory.Exists(READ_PATH))
Directory.CreateDirectory(READ_PATH);
zip = new FilePack20(lua_pack_path, PackMode.Read);
zip.UnPackFile(lua_dir);
File.Delete(lua_pack_path);
}
string rv = Path.Combine(READ_PATH, _base_path, "version.txt");
string directory = Path.GetDirectoryName(rv);
if (!Directory.Exists(directory))
{
Directory.CreateDirectory(directory); // 递归创建所有不存在的文件夹
}
File.WriteAllText(rv, version, System.Text.Encoding.ASCII);
}
catch
{
Directory.Delete(READ_PATH, true);
}
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 55efdee799c9f77498775894b7930d6d
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -7,6 +7,7 @@ using UnityEngine.Networking;
using taurus.unity; using taurus.unity;
using System.Text; using System.Text;
using System; using System;
using taurus.client;
/// <summary> /// <summary>
/// 版本检查与资源更新管理器 /// 版本检查与资源更新管理器
@ -354,7 +355,7 @@ public class VerCheck : MonoBehaviour
string asset_config_text = null; string asset_config_text = null;
// 如果本地版本为空或包含服务器版本的所有内容,需要下载资源配置 // 如果本地版本为空或包含服务器版本的所有内容,需要下载资源配置
if (local_version == null || local_version.ContainAll(server_version)) if (local_version == null)
{ {
// 构建资源配置文件的URL // 构建资源配置文件的URL
string ac_url=""; string ac_url="";
@ -389,6 +390,179 @@ public class VerCheck : MonoBehaviour
yield return null; yield return null;
} }
yield return request;
if (string.IsNullOrEmpty(request.error))
{
asset_config_text = request.text;
asset_config_list = Json.Deserialize(asset_config_text) as ArrayList;
if (asset_config_list == null)
{
ShowTip("连接错误导致游戏配置下载异常,请检查您的网络设置!", () =>
{
StartCoroutine(CheckAssetConfig(server_version));
});
yield break;
}
//
v_tex_info.text = "正在检查资源。。。";
GSlider _pd = _version_view.GetChild("pb_progress").asSlider;
_pd.value = 0;
if (!Directory.Exists(ResourcesManager.PACK_PATH))
{
Directory.CreateDirectory(ResourcesManager.PACK_PATH);
}
string copyVersionPath = Path.Combine(Application.streamingAssetsPath, "version.txt");
#if UNITY_IPHONE
string copyVersionString = "";
if (File.Exists(copyVersionPath))
{
copyVersionString = File.ReadAllText(copyVersionPath).Trim();
}
else
{
ShowTip("本地缓存版本加载失败", () =>
{
File.WriteAllText(Path.Combine(ResourcesManager.PACK_PATH, "version.txt"), "1.0.0");
StartCoroutine(CheckAssetConfig(server_version));
});
yield break;
}
#endif
#if UNITY_ANDROID
UnityWebRequest copyRequest = UnityWebRequest.Get(copyVersionPath);
yield return copyRequest.SendWebRequest();
if (copyRequest.isNetworkError || copyRequest.isHttpError)
{
/* ShowTip("本地缓存版本加载失败", () =>
{*/
File.WriteAllText(Path.Combine(ResourcesManager.PACK_PATH, "version.txt"), "1.0.0");
StartCoroutine(CheckAssetConfig(server_version));
//});
yield break;
}
string copyVersionString = copyRequest.downloadHandler.text.Trim();
#endif
bool isSame = copyVersionString.Equals(server_version.ToString());
if (isSame)
{
string copyZipPath = Path.Combine(Application.streamingAssetsPath, "Pack.byte");
#if UNITY_IPHONE
Byte[] zipData;
if (File.Exists(copyZipPath))
{
zipData = File.ReadAllBytes(copyZipPath);
}
else
{
ShowTip("本地缓存压缩包加载失败", () =>
{
StartCoroutine(CheckAssetConfig(server_version));
});
yield break;
}
/* if (zipData.LongLength < 1024)
{
ShowTip("本地缓存压缩包加载失败", () =>
{
StartCoroutine(CheckAssetConfig(server_version));
});
yield break;
}*/
string zipString = Path.Combine(Application.persistentDataPath, "Pack.byte");
File.WriteAllBytes(zipString, zipData);
#endif
#if UNITY_ANDROID
UnityWebRequest copyZipRequest = UnityWebRequest.Get(copyZipPath);
yield return copyZipRequest.SendWebRequest();
if (copyZipRequest.isNetworkError || copyZipRequest.isHttpError)
{
ShowTip("本地缓存压缩包加载失败", () =>
{
StartCoroutine(CheckAssetConfig(server_version));
});
yield break;
}
byte[] zipData = copyZipRequest.downloadHandler.data;
string zipString = Path.Combine(Application.persistentDataPath, "Pack.byte");
File.WriteAllBytes(zipString, zipData);
#endif
IFilePack zip = null;
zip = new FilePack20(zipString, PackMode.Read);
zip.UnPackFileSyn(ResourcesManager.PACK_PATH);
while (!zip.Complete)
{
_pd.value = zip.Progress*100;
yield return null;
}
StartCoroutine(CheckAssetConfig(server_version));
yield break;
}
else
{
File.WriteAllText(Path.Combine(ResourcesManager.PACK_PATH, "version.txt"), copyVersionString);
StartCoroutine(CheckAssetConfig(server_version));
yield break;
}
}
else
{
ShowTip("游戏资源下载失败,请检查您的网络设置!", () =>
{
StartCoroutine(CheckAssetConfig(server_version));
});
yield break;
}
}
}
else if (local_version.ContainAll(server_version))
{
string ac_url="";
if(isGFF==false)
ac_url = string.Format("{0}/config/asset_config{1}.json", Hotupdate.PackUrl, server_version.ToString());
else
ac_url = string.Format("http://{0}/NewFK/config/asset_config{1}.json", conn.ip + ":" + conn.port, server_version.ToString());
// Debugger.LogError("CheckAssetConfig===>>>");
// Debugger.LogError(ac_url);
float downTimeOut = 5;
using (var request = new WWW(ac_url))
{
float timeOut = Time.time;
float process = request.progress;
while (request != null && request.isDone == false)
{
if (process < request.progress)
{
timeOut = Time.time;
process = request.progress;
}
if (Time.time - timeOut > downTimeOut)
{
ShowTip("连接超时导致游戏配置下载异常,请检查您的网络设置!", () =>
{
StartCoroutine(CheckNet());
});
yield break;
}
yield return null;
}
yield return request; yield return request;
// 检查下载是否成功 // 检查下载是否成功

Binary file not shown.

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 13a2568f2d5900647bdc01afbc7740bf
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1 @@
1.0.10

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 509df9e8308921c48adea1d07ccd29ab
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -38,6 +38,7 @@ GraphicsSettings:
- {fileID: 16000, guid: 0000000000000000f000000000000000, type: 0} - {fileID: 16000, guid: 0000000000000000f000000000000000, type: 0}
- {fileID: 16001, guid: 0000000000000000f000000000000000, type: 0} - {fileID: 16001, guid: 0000000000000000f000000000000000, type: 0}
- {fileID: 17000, guid: 0000000000000000f000000000000000, type: 0} - {fileID: 17000, guid: 0000000000000000f000000000000000, type: 0}
- {fileID: 16003, guid: 0000000000000000f000000000000000, type: 0}
m_PreloadedShaders: [] m_PreloadedShaders: []
m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000, m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000,
type: 0} type: 0}