mirror of https://github.com/tuyoogame/YooAsset
Update AssetBundleCollector
parent
7bd09080ef
commit
473e52c5ba
|
@ -51,12 +51,12 @@ namespace YooAsset.Editor
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 是否收集全路径的着色器
|
/// 自动收集着色器
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public bool IsCollectAllShaders = false;
|
public bool AutoCollectShaders = false;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 收集的着色器Bundle名称
|
/// 自动收集的着色器资源包名
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string ShadersBundleName = "myshaders";
|
public string ShadersBundleName = "myshaders";
|
||||||
|
|
||||||
|
|
|
@ -157,7 +157,7 @@ namespace YooAsset.Editor
|
||||||
{
|
{
|
||||||
if (string.IsNullOrEmpty(shadersBundleName))
|
if (string.IsNullOrEmpty(shadersBundleName))
|
||||||
return;
|
return;
|
||||||
Setting.IsCollectAllShaders = isCollectAllShaders;
|
Setting.AutoCollectShaders = isCollectAllShaders;
|
||||||
Setting.ShadersBundleName = shadersBundleName;
|
Setting.ShadersBundleName = shadersBundleName;
|
||||||
SaveFile();
|
SaveFile();
|
||||||
}
|
}
|
||||||
|
@ -336,7 +336,7 @@ namespace YooAsset.Editor
|
||||||
}
|
}
|
||||||
private static bool IsCollectAsset(string assetPath, string filterRuleName)
|
private static bool IsCollectAsset(string assetPath, string filterRuleName)
|
||||||
{
|
{
|
||||||
if (Setting.IsCollectAllShaders)
|
if (Setting.AutoCollectShaders)
|
||||||
{
|
{
|
||||||
Type assetType = AssetDatabase.GetMainAssetTypeAtPath(assetPath);
|
Type assetType = AssetDatabase.GetMainAssetTypeAtPath(assetPath);
|
||||||
if (assetType == typeof(UnityEngine.Shader))
|
if (assetType == typeof(UnityEngine.Shader))
|
||||||
|
@ -354,7 +354,7 @@ namespace YooAsset.Editor
|
||||||
public static bool HasCollector(string assetPath)
|
public static bool HasCollector(string assetPath)
|
||||||
{
|
{
|
||||||
// 如果收集全路径着色器
|
// 如果收集全路径着色器
|
||||||
if (Setting.IsCollectAllShaders)
|
if (Setting.AutoCollectShaders)
|
||||||
{
|
{
|
||||||
System.Type assetType = AssetDatabase.GetMainAssetTypeAtPath(assetPath);
|
System.Type assetType = AssetDatabase.GetMainAssetTypeAtPath(assetPath);
|
||||||
if (assetType == typeof(UnityEngine.Shader))
|
if (assetType == typeof(UnityEngine.Shader))
|
||||||
|
@ -400,7 +400,7 @@ namespace YooAsset.Editor
|
||||||
public static string GetBundleLabel(string assetPath)
|
public static string GetBundleLabel(string assetPath)
|
||||||
{
|
{
|
||||||
// 如果收集全路径着色器
|
// 如果收集全路径着色器
|
||||||
if (Setting.IsCollectAllShaders)
|
if (Setting.AutoCollectShaders)
|
||||||
{
|
{
|
||||||
System.Type assetType = AssetDatabase.GetMainAssetTypeAtPath(assetPath);
|
System.Type assetType = AssetDatabase.GetMainAssetTypeAtPath(assetPath);
|
||||||
if (assetType == typeof(UnityEngine.Shader))
|
if (assetType == typeof(UnityEngine.Shader))
|
||||||
|
|
|
@ -101,7 +101,7 @@ namespace YooAsset.Editor
|
||||||
}
|
}
|
||||||
private void OnDrawShader()
|
private void OnDrawShader()
|
||||||
{
|
{
|
||||||
bool isCollectAllShader = AssetBundleCollectorSettingData.Setting.IsCollectAllShaders;
|
bool isCollectAllShader = AssetBundleCollectorSettingData.Setting.AutoCollectShaders;
|
||||||
string shadersBundleName = AssetBundleCollectorSettingData.Setting.ShadersBundleName;
|
string shadersBundleName = AssetBundleCollectorSettingData.Setting.ShadersBundleName;
|
||||||
|
|
||||||
EditorGUILayout.Space();
|
EditorGUILayout.Space();
|
||||||
|
|
Loading…
Reference in New Issue