mirror of
https://github.com/tuyoogame/YooAsset.git
synced 2026-05-22 16:50:18 +00:00
[bugfix]Convert the show name to the type name 把显示名字转换成类型名字
This commit is contained in:
@@ -102,6 +102,38 @@ namespace YooAsset.Editor
|
||||
}
|
||||
return names;
|
||||
}
|
||||
|
||||
public static string GetAddressRuleName(int index)
|
||||
{
|
||||
if (_setting == null)
|
||||
LoadSettingData();
|
||||
return GetTypesName(_cacheAddressRuleTypes, index);
|
||||
}
|
||||
|
||||
public static string GetPackRuleName(int index)
|
||||
{
|
||||
if (_setting == null)
|
||||
LoadSettingData();
|
||||
return GetTypesName(_cachePackRuleTypes, index);
|
||||
}
|
||||
|
||||
public static string GetFilterRuleName(int index)
|
||||
{
|
||||
if (_setting == null)
|
||||
LoadSettingData();
|
||||
return GetTypesName(_cacheFilterRuleTypes, index);
|
||||
}
|
||||
|
||||
static string GetTypesName(Dictionary<string, System.Type> types, int index)
|
||||
{
|
||||
|
||||
if(index >= types.Keys.Count)
|
||||
{
|
||||
throw new Exception($"Invalid GetFilterRuleName Keys.Count {types.Keys.Count} : try get index {index}");
|
||||
}
|
||||
return types.Keys.ElementAt(index);
|
||||
}
|
||||
|
||||
public static bool HasActiveRuleName(string ruleName)
|
||||
{
|
||||
foreach (var pair in _cacheActiveRuleTypes)
|
||||
|
||||
Reference in New Issue
Block a user