update shader variant collector

pull/62/head
hevinci 2023-02-06 17:50:36 +08:00
parent 03abac082c
commit 33a1b9d4bf
3 changed files with 17 additions and 5 deletions

View File

@ -23,6 +23,7 @@ namespace YooAsset.Editor
}
private const float WaitMilliseconds = 1000f;
private const float SleepMilliseconds = 100f;
private static string _savePath;
private static string _packageName;
private static int _processMaxNum;
@ -107,7 +108,7 @@ namespace YooAsset.Editor
if (_steps == ESteps.CollectSleeping)
{
if (_elapsedTime.ElapsedMilliseconds > WaitMilliseconds)
if (_elapsedTime.ElapsedMilliseconds > SleepMilliseconds)
{
DestroyAllSpheres();
_elapsedTime.Stop();
@ -236,7 +237,7 @@ namespace YooAsset.Editor
_allSpheres.Clear();
// 尝试释放编辑器加载的资源
EditorUtility.UnloadUnusedAssetsImmediate();
EditorUtility.UnloadUnusedAssetsImmediate(true);
}
private static void CreateManifest()
{

View File

@ -8,7 +8,7 @@ namespace YooAsset
/// <summary>
/// AssetBundle文件的后缀名
/// </summary>
public string AssetBundleFileVariant = "bundle";
public string BundleFileVariant = "bundle";
/// <summary>
/// 原生文件的后缀名
@ -42,6 +42,17 @@ namespace YooAsset
public const string PatchManifestFileVersion = "1.4.0";
/// <summary>
/// 缓存的数据文件名称
/// </summary>
public const string CacheBundleDataFileName = "__data";
/// <summary>
/// 缓存的信息文件名称
/// </summary>
public const string CacheBundleInfoFileName = "__info";
/// <summary>
/// 构建输出文件夹名称
/// </summary>

View File

@ -79,9 +79,9 @@ namespace YooAsset
{
string shareBundleName;
if (uniqueBundleName)
shareBundleName = $"{packageName.ToLower()}_{YooAssetSettings.UnityShadersBundleName}.{Setting.AssetBundleFileVariant}";
shareBundleName = $"{packageName.ToLower()}_{YooAssetSettings.UnityShadersBundleName}.{Setting.BundleFileVariant}";
else
shareBundleName = $"{YooAssetSettings.UnityShadersBundleName}.{Setting.AssetBundleFileVariant}";
shareBundleName = $"{YooAssetSettings.UnityShadersBundleName}.{Setting.BundleFileVariant}";
return shareBundleName.ToLower();
}
}