【m】shader变体测试
This commit is contained in:
@@ -26,7 +26,6 @@ namespace Stary.Evo.Editor
|
||||
}
|
||||
|
||||
|
||||
|
||||
//[MenuItem("Evo/Hotfix/Addressable")]
|
||||
public static void AddHotfixAddressableDll()
|
||||
{
|
||||
@@ -160,12 +159,12 @@ namespace Stary.Evo.Editor
|
||||
AssetDatabase.LoadAssetAtPath<DomainConfig>(configPath);
|
||||
packageName = domainConfig.domain;
|
||||
Mark();
|
||||
//CollectSVC();
|
||||
|
||||
|
||||
CreateRes(packageName,
|
||||
$"{DomainRoot}/{BuildAssetWindow.GetBuildPackageName()}/AddressableRes",
|
||||
$"{DomainRoot}/{BuildAssetWindow.GetBuildPackageName()}/HotUpdate");
|
||||
|
||||
CollectSVC();
|
||||
EditorUtility.DisplayDialog("自动标记", "自动标记成功", "确定");
|
||||
}
|
||||
|
||||
@@ -236,8 +235,8 @@ namespace Stary.Evo.Editor
|
||||
///自动创建图集
|
||||
Debug.Log("开始创建图集");
|
||||
AutoCreateSpriteAtlas(remotedRoot);
|
||||
AssetDatabase.SaveAssets();
|
||||
AssetDatabase.Refresh();
|
||||
// AssetDatabase.SaveAssets();
|
||||
// AssetDatabase.Refresh();
|
||||
MarkStatus();
|
||||
YooAsset.Editor.AssetBundleCollectorSettingData.SaveFile();
|
||||
|
||||
@@ -473,18 +472,26 @@ namespace Stary.Evo.Editor
|
||||
|
||||
public static void CollectSVC()
|
||||
{
|
||||
string remotedRoot = $"{DomainRoot}/{packageName}/AddressableRes";
|
||||
remotedRoot += $"/ShaderVariants/{BuildAssetWindow.GetBuildPackageName()}.shadervariants";
|
||||
string remotedRoot = $"{DomainRoot}/{packageName}/ShaderVariants";
|
||||
string remotedRootFileName = $"{remotedRoot}/{BuildAssetWindow.GetBuildPackageName()}.shadervariants";
|
||||
if (!Directory.Exists(remotedRoot))
|
||||
{
|
||||
Directory.CreateDirectory(remotedRoot);
|
||||
AssetDatabase.Refresh();
|
||||
}
|
||||
|
||||
string localSavePath = FilesUtils.AbsoluteToRelativePath("Assets", remotedRootFileName); //Asset到文件的路径
|
||||
|
||||
string localSavePath = FilesUtils.AbsoluteToRelativePath("Assets", remotedRoot); //Asset到文件的路径
|
||||
System.Action completedCallback = () =>
|
||||
{
|
||||
ShaderVariantCollection collection =
|
||||
AssetDatabase.LoadAssetAtPath<ShaderVariantCollection>(localSavePath);
|
||||
if (collection != null)
|
||||
{
|
||||
Debug.Log($"UnityEvo:【{BuildAssetWindow.GetBuildPackageName()}】ShaderCount : {collection.shaderCount}");
|
||||
Debug.Log($"UnityEvo:【{BuildAssetWindow.GetBuildPackageName()}】VariantCount : {collection.variantCount}");
|
||||
Debug.Log(
|
||||
$"UnityEvo:【{BuildAssetWindow.GetBuildPackageName()}】ShaderCount : {collection.shaderCount}");
|
||||
Debug.Log(
|
||||
$"UnityEvo:【{BuildAssetWindow.GetBuildPackageName()}】VariantCount : {collection.variantCount}");
|
||||
|
||||
string groupname = "ShaderVariants";
|
||||
AssetBundleCollectorGroup collectorGroup = null;
|
||||
@@ -520,6 +527,5 @@ namespace Stary.Evo.Editor
|
||||
};
|
||||
ShaderVariantCollector.Run(localSavePath, BuildAssetWindow.GetBuildPackageName(), 1000, completedCallback);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "com.staryevo.main",
|
||||
"version": "1.3.17",
|
||||
"version": "1.3.18",
|
||||
"displayName": "00.StaryEvo",
|
||||
"description": "This is an Framework package(后台服务器版本,端口9527)",
|
||||
"unity": "2021.3",
|
||||
|
||||
Reference in New Issue
Block a user