mirror of https://github.com/tuyoogame/YooAsset
fix #307
parent
58fc76b8d2
commit
19e0c7b01a
|
@ -46,7 +46,7 @@ namespace YooAsset.Editor
|
|||
|
||||
// 检测分组是否激活
|
||||
IActiveRule activeRule = AssetBundleCollectorSettingData.GetActiveRuleInstance(ActiveRuleName);
|
||||
if (activeRule.IsActiveGroup() == false)
|
||||
if (activeRule.IsActiveGroup(new GroupData(GroupName)) == false)
|
||||
return;
|
||||
|
||||
foreach (var collector in Collectors)
|
||||
|
@ -80,7 +80,7 @@ namespace YooAsset.Editor
|
|||
|
||||
// 检测分组是否激活
|
||||
IActiveRule activeRule = AssetBundleCollectorSettingData.GetActiveRuleInstance(ActiveRuleName);
|
||||
if (activeRule.IsActiveGroup() == false)
|
||||
if (activeRule.IsActiveGroup(new GroupData(GroupName)) == false)
|
||||
{
|
||||
return new List<CollectAssetInfo>();
|
||||
}
|
||||
|
|
|
@ -657,7 +657,7 @@ namespace YooAsset.Editor
|
|||
|
||||
// 激活状态
|
||||
IActiveRule activeRule = AssetBundleCollectorSettingData.GetActiveRuleInstance(group.ActiveRuleName);
|
||||
bool isActive = activeRule.IsActiveGroup();
|
||||
bool isActive = activeRule.IsActiveGroup(new GroupData(group.GroupName));
|
||||
textField1.SetEnabled(isActive);
|
||||
}
|
||||
private void GroupListView_onSelectionChange(IEnumerable<object> objs)
|
||||
|
|
|
@ -1,6 +1,16 @@
|
|||
|
||||
namespace YooAsset.Editor
|
||||
{
|
||||
public struct GroupData
|
||||
{
|
||||
public string GroupName;
|
||||
|
||||
public GroupData(string groupName)
|
||||
{
|
||||
GroupName = groupName;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 资源分组激活规则接口
|
||||
/// </summary>
|
||||
|
@ -9,6 +19,6 @@ namespace YooAsset.Editor
|
|||
/// <summary>
|
||||
/// 是否激活分组
|
||||
/// </summary>
|
||||
bool IsActiveGroup();
|
||||
bool IsActiveGroup(GroupData data);
|
||||
}
|
||||
}
|
|
@ -4,7 +4,7 @@ namespace YooAsset.Editor
|
|||
[DisplayName("启用分组")]
|
||||
public class EnableGroup : IActiveRule
|
||||
{
|
||||
public bool IsActiveGroup()
|
||||
public bool IsActiveGroup(GroupData data)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
@ -13,7 +13,7 @@ namespace YooAsset.Editor
|
|||
[DisplayName("禁用分组")]
|
||||
public class DisableGroup : IActiveRule
|
||||
{
|
||||
public bool IsActiveGroup()
|
||||
public bool IsActiveGroup(GroupData data)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue