Update AssetBundleWindow

修复了非主动收集的着色器没有打进统一的着色器资源包的问题。
修复了单个收集的资源对象没有设置依赖资源列表的问题。
资源打包的过滤文件列表增加cginc格式。
This commit is contained in:
hevinci
2022-04-18 19:48:37 +08:00
parent 09807901c0
commit 533f96361a
3 changed files with 63 additions and 20 deletions

View File

@@ -31,6 +31,11 @@ namespace YooAsset.Editor
/// </summary>
public bool IsCollectAsset { private set; get; }
/// <summary>
/// 是否为着色器资源
/// </summary>
public bool IsShaderAsset { private set; get; }
/// <summary>
/// 被依赖次数
/// </summary>
@@ -54,6 +59,12 @@ namespace YooAsset.Editor
IsRawAsset = isRawAsset;
NotWriteToAssetList = notWriteToAssetList;
IsCollectAsset = true;
System.Type assetType = UnityEditor.AssetDatabase.GetMainAssetTypeAtPath(assetPath);
if (assetType == typeof(UnityEngine.Shader))
IsShaderAsset = true;
else
IsShaderAsset = false;
}
public BuildAssetInfo(string assetPath)
{
@@ -61,6 +72,12 @@ namespace YooAsset.Editor
IsRawAsset = false;
NotWriteToAssetList = true;
IsCollectAsset = false;
System.Type assetType = UnityEditor.AssetDatabase.GetMainAssetTypeAtPath(assetPath);
if (assetType == typeof(UnityEngine.Shader))
IsShaderAsset = true;
else
IsShaderAsset = false;
}
/// <summary>
@@ -82,7 +99,7 @@ namespace YooAsset.Editor
if (string.IsNullOrEmpty(BundleName) == false)
throw new System.Exception("Should never get here !");
BundleName = bundleName;
BundleName = bundleName;
}
/// <summary>
@@ -99,7 +116,7 @@ namespace YooAsset.Editor
/// <summary>
/// 添加资源分类标签
/// </summary>
public void AddAssetTag(string tag)
public void AddAssetTag(string tag)
{
if (AssetTags.Contains(tag) == false)
{