部分打包逻辑修改
parent
88d8ea4389
commit
6c94f5d1fd
|
|
@ -35,7 +35,7 @@ MonoBehaviour:
|
|||
FilterRuleName: CollectSprite
|
||||
AssetTags:
|
||||
UserData:
|
||||
- CollectPath: Assets/AssetRaw/UIRaw/Raw/Level/animalparty
|
||||
- CollectPath: Assets/AssetRaw/UIRaw/Raw/Level/main
|
||||
CollectorGUID: 1c17b617b71c34255ac4108d736950ed
|
||||
CollectorType: 0
|
||||
AddressRuleName: AddressByFileName
|
||||
|
|
@ -51,51 +51,3 @@ MonoBehaviour:
|
|||
FilterRuleName: CollectAll
|
||||
AssetTags:
|
||||
UserData:
|
||||
- CollectPath: Assets/AssetRaw/UIRaw/Raw/Level/doodledelight
|
||||
CollectorGUID: 2cfdbbca31c6c4620b97e5def3c5cf47
|
||||
CollectorType: 0
|
||||
AddressRuleName: AddressByFileName
|
||||
PackRuleName: PackTopDirectory
|
||||
FilterRuleName: CollectAll
|
||||
AssetTags:
|
||||
UserData:
|
||||
- CollectPath: Assets/AssetRaw/UIRaw/Raw/Level/mysterymeow
|
||||
CollectorGUID: 965d090bb8f0e4271b70e77e53039e18
|
||||
CollectorType: 0
|
||||
AddressRuleName: AddressByFileName
|
||||
PackRuleName: PackTopDirectory
|
||||
FilterRuleName: CollectAll
|
||||
AssetTags:
|
||||
UserData:
|
||||
- CollectPath: Assets/AssetRaw/UIRaw/Raw/Level/retrocharm
|
||||
CollectorGUID: 7b6ec4b6421864bfa897b0d241d38a8c
|
||||
CollectorType: 0
|
||||
AddressRuleName: AddressByFileName
|
||||
PackRuleName: PackTopDirectory
|
||||
FilterRuleName: CollectAll
|
||||
AssetTags:
|
||||
UserData:
|
||||
- CollectPath: Assets/AssetRaw/UIRaw/Raw/Level/thesmiths
|
||||
CollectorGUID: 250cbe2a1c5fb4266bca2cf02f7c914d
|
||||
CollectorType: 0
|
||||
AddressRuleName: AddressByFileName
|
||||
PackRuleName: PackTopDirectory
|
||||
FilterRuleName: CollectAll
|
||||
AssetTags:
|
||||
UserData:
|
||||
- CollectPath: Assets/AssetRaw/UIRaw/Raw/Level/tidyup
|
||||
CollectorGUID: 2b16ad3c8ad7542d786e8ae48fb2a1e7
|
||||
CollectorType: 0
|
||||
AddressRuleName: AddressByFileName
|
||||
PackRuleName: PackTopDirectory
|
||||
FilterRuleName: CollectAll
|
||||
AssetTags:
|
||||
UserData:
|
||||
- CollectPath: Assets/AssetRaw/UIRaw/Raw/Level/trackhunt
|
||||
CollectorGUID: 24f8efd523b9343e48a602fb442fd15b
|
||||
CollectorType: 0
|
||||
AddressRuleName: AddressByFileName
|
||||
PackRuleName: PackTopDirectory
|
||||
FilterRuleName: CollectAll
|
||||
AssetTags:
|
||||
UserData:
|
||||
|
|
|
|||
|
|
@ -1,8 +0,0 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 8c41414d13c2749c38819bf9f9c32257
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 2cfdbbca31c6c4620b97e5def3c5cf47
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 1c17b617b71c34255ac4108d736950ed
|
||||
guid: addf9edfb5e3e47f3b986c26049e1691
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 965d090bb8f0e4271b70e77e53039e18
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 7b6ec4b6421864bfa897b0d241d38a8c
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 250cbe2a1c5fb4266bca2cf02f7c914d
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 2b16ad3c8ad7542d786e8ae48fb2a1e7
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 24f8efd523b9343e48a602fb442fd15b
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 9d956dabce56d4e18937ab68e94bb001
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
fileFormatVersion: 2
|
||||
guid: d1c6e58c2c4694ec0bdb395afccacef4
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 3cc5406dc53c14e2190deaafcfa2bc33
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
fileFormatVersion: 2
|
||||
guid: a8872076958014e08ad505763938381d
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 83148db1cb56b4629b4b3113862fada8
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 64b4e87dfb41744b89b9e872f1e79cae
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 4540f0d639fb941f0840cf0c7fd6e61c
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
fileFormatVersion: 2
|
||||
guid: a6b00a5bbca684f8b8f5d9656d18f7a7
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -42,6 +42,7 @@ public static class BuildBundlesHelper
|
|||
[MenuItem("Tools/TestBuildBundles")]
|
||||
public static void TestBuildBundles()
|
||||
{
|
||||
|
||||
Debug.LogWarning("MakeAtlas Start ==================");
|
||||
MakeAtlas();
|
||||
AssetDatabase.Refresh();
|
||||
|
|
@ -200,7 +201,7 @@ public static class BuildBundlesHelper
|
|||
if(picPath.EndsWith(".meta"))
|
||||
continue;
|
||||
|
||||
if (picPath.Contains("_tfull_") || picPath.Contains("_tmask_"))
|
||||
if (picPath.Contains("_tfull_") || picPath.Contains("_tmask_") || picPath.Contains("_tlight_") || picPath.Contains("_tshadow_"))
|
||||
{
|
||||
var sprite = AssetDatabase.LoadAssetAtPath<Sprite>(picPath);
|
||||
if (sprite != null)
|
||||
|
|
|
|||
|
|
@ -1,13 +1,14 @@
|
|||
public enum GamePlay
|
||||
{
|
||||
thesmiths = 0, //史密斯一家
|
||||
retrocharm, //复古魅力
|
||||
animalparty, //动物派对
|
||||
trackhunt, //踪迹追寻
|
||||
doodledelight, //快乐涂鸦
|
||||
mysterymeow, //神秘猫咪
|
||||
tidyup, //整理房间
|
||||
colorfun, //填色乐趣
|
||||
main = 0, //主玩法
|
||||
// thesmiths = 0, //史密斯一家
|
||||
// retrocharm, //复古魅力
|
||||
// animalparty, //动物派对
|
||||
// trackhunt, //踪迹追寻
|
||||
// doodledelight, //快乐涂鸦
|
||||
// mysterymeow, //神秘猫咪
|
||||
// tidyup, //整理房间
|
||||
// colorfun, //填色乐趣
|
||||
|
||||
end, //始终放在最后
|
||||
}
|
||||
|
|
|
|||
|
|
@ -35,7 +35,8 @@ public class TextureProcess : AssetPostprocessor
|
|||
textureImporter.mipmapEnabled = false;
|
||||
textureImporter.wrapMode = TextureWrapMode.Clamp;
|
||||
textureImporter.filterMode = FilterMode.Bilinear;
|
||||
textureImporter.SetPlatformTextureSettings(GetAndroidTextureSettings(TextureImporterFormat.ASTC_6x6));
|
||||
textureImporter.SetPlatformTextureSettings(GetAndroidTextureSettings(TextureImporterFormat.ASTC_6x6,
|
||||
4096));
|
||||
textureImporter.SetPlatformTextureSettings(GetiOSTextureSettings(TextureImporterFormat.ASTC_6x6));
|
||||
}
|
||||
else
|
||||
|
|
|
|||
|
|
@ -131,17 +131,17 @@ if __name__ == '__main__':
|
|||
opts.resversion = "1"
|
||||
opts.buildtype = "BuildBundle"
|
||||
|
||||
# # 本地自测适用
|
||||
# 本地自测适用
|
||||
# opts.aab = "false"
|
||||
# opts.mode = "Debug"
|
||||
# opts.platform = "Android"
|
||||
# opts.assets = "/Users/xiaohang/guru_assets/find_it/find-it-art"
|
||||
# opts.resources = "/Users/xiaohang/guru_assets/find_it/find-it-bundle-resource"
|
||||
# opts.assets = "/Users/a0729/gogs.git/find-vertical-art"
|
||||
# opts.resources = "/Users/a0729/gogs.git/find-vertical-bundle-resource"
|
||||
# opts.unityexe = "/Applications/Unity/Hub/Editor/2021.3.32f1/Unity.app/Contents/MacOS/Unity"
|
||||
# opts.log = "log/build.log"
|
||||
# opts.upload = "true"
|
||||
# opts.special = "thesmiths_ws20231211_1"
|
||||
# #
|
||||
# opts.upload = "false"
|
||||
# opts.special = "main_30point_ws20250422_1"
|
||||
#
|
||||
|
||||
is_upload = True if opts.upload == "true" else False
|
||||
|
||||
|
|
@ -205,7 +205,7 @@ if __name__ == '__main__':
|
|||
if asset_id not in modify_files:
|
||||
modify_files.append(asset_id)
|
||||
print(f"modify_files = {modify_files}")
|
||||
alert.alert(f"构建资源列表:{str(modify_files)}")
|
||||
# alert.alert(f"构建资源列表:{str(modify_files)}")
|
||||
tmstp1 = time.time()
|
||||
# 解析psd => Unity工程
|
||||
for gameplay in mainPlayType.all_main_play_type_list:
|
||||
|
|
|
|||
|
|
@ -33,32 +33,36 @@ class MainPlayType:
|
|||
self.debug_enable_main_play_type_list = []
|
||||
self.release_enable_main_play_type_list = []
|
||||
|
||||
sheet_helper = GoogleSheetHelper()
|
||||
sheet = sheet_helper.get_sheet_table(config.sheet_level_config, config.table_main_level_type)
|
||||
sheet_datas = sheet.get_all_values(major_dimension='ROWS')
|
||||
col_key, col_debug_enable, col_release_enable = -1, -1, -1
|
||||
for i, row_values in enumerate(sheet_datas):
|
||||
if i == 0:
|
||||
for j, value in enumerate(row_values):
|
||||
if value == "key":
|
||||
col_key = j + 1
|
||||
elif value == "debug_enable":
|
||||
col_debug_enable = j + 1
|
||||
elif value == "release_enable":
|
||||
col_release_enable = j + 1
|
||||
else:
|
||||
if col_key == -1 or col_debug_enable == -1 or col_release_enable == -1:
|
||||
config.notification_helper.append_msg(f"{config.sheet_level_config}文档{config.table_main_level_type}表,数据格式异常")
|
||||
return
|
||||
play_type = row_values[col_key - 1]
|
||||
debug_enable = row_values[col_debug_enable - 1]
|
||||
release_enable = row_values[col_release_enable - 1]
|
||||
if play_type not in self.all_main_play_type_list:
|
||||
self.all_main_play_type_list.append(play_type)
|
||||
self.all_main_play_type_list.append('main')
|
||||
self.debug_enable_main_play_type_list.append('main')
|
||||
self.release_enable_main_play_type_list.append('main')
|
||||
|
||||
if play_type not in self.debug_enable_main_play_type_list and debug_enable == '1':
|
||||
self.debug_enable_main_play_type_list.append(play_type)
|
||||
|
||||
if play_type not in self.release_enable_main_play_type_list and release_enable == '1':
|
||||
self.release_enable_main_play_type_list.append(play_type)
|
||||
# sheet_helper = GoogleSheetHelper()
|
||||
# sheet = sheet_helper.get_sheet_table(config.sheet_level_config, config.table_main_level_type)
|
||||
# sheet_datas = sheet.get_all_values(major_dimension='ROWS')
|
||||
# col_key, col_debug_enable, col_release_enable = -1, -1, -1
|
||||
# for i, row_values in enumerate(sheet_datas):
|
||||
# if i == 0:
|
||||
# for j, value in enumerate(row_values):
|
||||
# if value == "key":
|
||||
# col_key = j + 1
|
||||
# elif value == "debug_enable":
|
||||
# col_debug_enable = j + 1
|
||||
# elif value == "release_enable":
|
||||
# col_release_enable = j + 1
|
||||
# else:
|
||||
# if col_key == -1 or col_debug_enable == -1 or col_release_enable == -1:
|
||||
# config.notification_helper.append_msg(f"{config.sheet_level_config}文档{config.table_main_level_type}表,数据格式异常")
|
||||
# return
|
||||
# play_type = row_values[col_key - 1]
|
||||
# debug_enable = row_values[col_debug_enable - 1]
|
||||
# release_enable = row_values[col_release_enable - 1]
|
||||
# if play_type not in self.all_main_play_type_list:
|
||||
# self.all_main_play_type_list.append(play_type)
|
||||
#
|
||||
# if play_type not in self.debug_enable_main_play_type_list and debug_enable == '1':
|
||||
# self.debug_enable_main_play_type_list.append(play_type)
|
||||
#
|
||||
# if play_type not in self.release_enable_main_play_type_list and release_enable == '1':
|
||||
# self.release_enable_main_play_type_list.append(play_type)
|
||||
|
||||
|
|
|
|||
|
|
@ -186,7 +186,7 @@ def parse_psd(path, output_root, specific_files, platform):
|
|||
utils.mkdirs(levels_root_path)
|
||||
utils.mkdirs(thumbnail_root_path)
|
||||
version_path = os.path.join(output_root, f"../psd_version.json")
|
||||
load_version()
|
||||
# load_version()
|
||||
all_parse_asset_names = []
|
||||
for root, dirs, files in os.walk(path):
|
||||
for name in files:
|
||||
|
|
@ -198,8 +198,8 @@ def parse_psd(path, output_root, specific_files, platform):
|
|||
continue
|
||||
|
||||
hash_old = ""
|
||||
if asset_id in versions:
|
||||
hash_old = versions[asset_id]
|
||||
# if asset_id in versions:
|
||||
# hash_old = versions[asset_id]
|
||||
hash_now = utils.calc_hash(src_filename)
|
||||
print("文件:" + src_filename + " => old = " + hash_old + " now = " + hash_now)
|
||||
if hash_old != hash_now:
|
||||
|
|
@ -224,8 +224,8 @@ def parse_psd(path, output_root, specific_files, platform):
|
|||
psd_filename = "{}.psd".format(os.path.splitext(os.path.join(root, name))[0])
|
||||
run(psd_filename, levels_output_dir, thumbnail_output_dir)
|
||||
all_parse_asset_names.append(asset_id)
|
||||
versions[asset_id] = hash_now
|
||||
write_version()
|
||||
# versions[asset_id] = hash_now
|
||||
# write_version()
|
||||
os.remove(psd_filename)
|
||||
return all_parse_asset_names
|
||||
|
||||
|
|
@ -236,5 +236,14 @@ if __name__ == "__main__":
|
|||
# parse_psd(sys.argv[1], sys.argv[2], [])
|
||||
# print(os.getcwd())
|
||||
# print(os.path.curdir)
|
||||
psd_path = "./CheckPsd/tidyup_ws20250418_1.psd"
|
||||
run(psd_path,'./test','./test/thu')
|
||||
# psd_path = "./CheckPsd/main_30point_ws20250422_1.psd"
|
||||
psd_dir = "./CheckPsd"
|
||||
psd_files = {}
|
||||
for filename in os.listdir(psd_dir):
|
||||
filepath = os.path.join(psd_dir, filename)
|
||||
if os.path.isfile(filepath) and filename.lower().endswith('.psd'):
|
||||
file_name = filename.replace('.psd', '')
|
||||
psd_files[file_name] = filepath
|
||||
print(psd_files)
|
||||
for k,v in psd_files.items():
|
||||
run(v,f'./{k}',f'./{k}/thu')
|
||||
Loading…
Reference in New Issue