【m】修改shder打包时序

This commit is contained in:
2025-07-23 10:12:03 +08:00
parent fe96c4ff34
commit a279111a70
3 changed files with 26 additions and 10 deletions

View File

@@ -24,13 +24,9 @@ namespace Stary.Evo.Editor
ChangeHotUpdateSchema.SetHotUpdateMode(HotUpdateMode.HotUpdate); ChangeHotUpdateSchema.SetHotUpdateMode(HotUpdateMode.HotUpdate);
} }
#elif HotUpdate #elif HotUpdate
var window = (OneKeyBuildWindow)EditorWindow.GetWindow(typeof(OneKeyBuildWindow)); var window = (OneKeyBuildWindow)EditorWindow.GetWindow(typeof(OneKeyBuildWindow));
window.Show(); window.Show();
#endif #endif
} }
[Title("全选"), OnValueChanged("OneKeyBuildEvent"), HideLabel] [Title("全选"), OnValueChanged("OneKeyBuildEvent"), HideLabel]
@@ -68,6 +64,23 @@ namespace Stary.Evo.Editor
#endif #endif
} }
[Button("(一键)收集shader【材质异常或资源修改】", ButtonSizes.Large)]
public void OneShaderMark()
{
#if HotUpdate
//标记全部资源
foreach (var oneKeyBUildEntity in OneKeyBuildEntities)
{
if (oneKeyBUildEntity.isRaw)
{
MarkAdressable.CollectSVC(oneKeyBUildEntity.DomainName);
}
}
EditorUtility.DisplayDialog("提示", $"标记所有shader完成", "确定");
#endif
}
[Button("(一键)获取服务器版本", ButtonSizes.Large)] [Button("(一键)获取服务器版本", ButtonSizes.Large)]
public async void OneUpdatePackageVersion() public async void OneUpdatePackageVersion()
{ {
@@ -83,12 +96,14 @@ namespace Stary.Evo.Editor
if (buildAssetDataSetting != null) if (buildAssetDataSetting != null)
{ {
//初始化读取资源配置表 //初始化读取资源配置表
HotfixMainResDomain hotfixMainResDomain = Resources.Load<HotfixMainResDomain>("HotfixMainResDomain"); HotfixMainResDomain hotfixMainResDomain =
Resources.Load<HotfixMainResDomain>("HotfixMainResDomain");
if (hotfixMainResDomain == null) if (hotfixMainResDomain == null)
{ {
Debug.LogError($"UnityEvo:读取资源配置表失败【HotfixMainResDomain】...表不存在"); Debug.LogError($"UnityEvo:读取资源配置表失败【HotfixMainResDomain】...表不存在");
continue; continue;
} }
var ip = hotfixMainResDomain.hotfixMainResDomainEntity.ipconfig; var ip = hotfixMainResDomain.hotfixMainResDomainEntity.ipconfig;
string url = $"{ip}/ResDomain/GetResDomainByDomain"; string url = $"{ip}/ResDomain/GetResDomainByDomain";
var resDmainRequst = new ResDmainRequst() var resDmainRequst = new ResDmainRequst()
@@ -111,7 +126,7 @@ namespace Stary.Evo.Editor
buildAssetDataSetting.packageVersionZ++; buildAssetDataSetting.packageVersionZ++;
EditorUtility.SetDirty(buildAssetDataSetting); EditorUtility.SetDirty(buildAssetDataSetting);
} }
else if (resDmainMessageEntity.code == 1011) else if (resDmainMessageEntity.code == 1011)
{ {
buildAssetDataSetting.packageVersionX = 1; buildAssetDataSetting.packageVersionX = 1;
buildAssetDataSetting.packageVersionY = 0; buildAssetDataSetting.packageVersionY = 0;
@@ -178,7 +193,7 @@ namespace Stary.Evo.Editor
if (buildAssetDataSetting != null) if (buildAssetDataSetting != null)
{ {
string zipFilePath = BuildAssetWindow.BuildZip(buildAssetDataSetting); string zipFilePath = BuildAssetWindow.BuildZip(buildAssetDataSetting);
await BuildAssetWindow.UpdateFileDataResDomain(buildAssetDataSetting, zipFilePath); await BuildAssetWindow.UpdateFileDataResDomain(buildAssetDataSetting, zipFilePath);
await Task.Delay(1000); await Task.Delay(1000);
EditorUtility.ClearProgressBar(); EditorUtility.ClearProgressBar();
} }
@@ -188,6 +203,7 @@ namespace Stary.Evo.Editor
} }
} }
} }
EditorUtility.DisplayDialog("提示", $"服务器上传完成", "确定"); EditorUtility.DisplayDialog("提示", $"服务器上传完成", "确定");
} }

View File

@@ -127,7 +127,7 @@ namespace Stary.Evo.Editor
$"{DomainRoot}/{oneKeyBUildEntity.DomainName}/AddressableRes", $"{DomainRoot}/{oneKeyBUildEntity.DomainName}/AddressableRes",
$"{DomainRoot}/{oneKeyBUildEntity.DomainName}/HotUpdate"); $"{DomainRoot}/{oneKeyBUildEntity.DomainName}/HotUpdate");
CollectSVC(oneKeyBUildEntity.DomainName);
} }
} }
} }

View File

@@ -1,6 +1,6 @@
{ {
"name": "com.staryevo.main", "name": "com.staryevo.main",
"version": "1.3.21", "version": "1.3.22",
"displayName": "00.StaryEvo", "displayName": "00.StaryEvo",
"description": "This is an Framework package(后台服务器版本端口9527)", "description": "This is an Framework package(后台服务器版本端口9527)",
"unity": "2021.3", "unity": "2021.3",