mirror of https://github.com/tuyoogame/YooAsset
parent
e664f20d34
commit
21fbb01ce4
|
@ -180,9 +180,9 @@ namespace YooAsset.Editor
|
||||||
for (int index = 0; index < manifest.BundleList.Count; index++)
|
for (int index = 0; index < manifest.BundleList.Count; index++)
|
||||||
{
|
{
|
||||||
var packageBundle = manifest.BundleList[index];
|
var packageBundle = manifest.BundleList[index];
|
||||||
if (_cacheBundleTags.ContainsKey(index))
|
if (_cacheBundleTags.TryGetValue(index, out var value))
|
||||||
{
|
{
|
||||||
packageBundle.Tags = _cacheBundleTags[index].ToArray();
|
packageBundle.Tags = value.ToArray();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -56,9 +56,9 @@ namespace YooAsset.Editor
|
||||||
string bundleName = collectAssetInfo.BundleName;
|
string bundleName = collectAssetInfo.BundleName;
|
||||||
foreach (var dependAsset in collectAssetInfo.DependAssets)
|
foreach (var dependAsset in collectAssetInfo.DependAssets)
|
||||||
{
|
{
|
||||||
if (allBuildAssetInfos.ContainsKey(dependAsset.AssetPath))
|
if (allBuildAssetInfos.TryGetValue(dependAsset.AssetPath, out var value))
|
||||||
{
|
{
|
||||||
allBuildAssetInfos[dependAsset.AssetPath].AddReferenceBundleName(bundleName);
|
value.AddReferenceBundleName(bundleName);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -14,7 +14,7 @@ namespace YooAsset.Editor
|
||||||
|
|
||||||
protected override string[] GetBundleDepends(BuildContext context, string bundleName)
|
protected override string[] GetBundleDepends(BuildContext context, string bundleName)
|
||||||
{
|
{
|
||||||
return new string[] { };
|
return Array.Empty<string>();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -23,7 +23,7 @@ namespace YooAsset.Editor
|
||||||
|
|
||||||
private static readonly Dictionary<string, System.Type> _cacheIgnoreRuleTypes = new Dictionary<string, System.Type>();
|
private static readonly Dictionary<string, System.Type> _cacheIgnoreRuleTypes = new Dictionary<string, System.Type>();
|
||||||
private static readonly Dictionary<string, IIgnoreRule> _cacheIgnoreRuleInstance = new Dictionary<string, IIgnoreRule>();
|
private static readonly Dictionary<string, IIgnoreRule> _cacheIgnoreRuleInstance = new Dictionary<string, IIgnoreRule>();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 配置数据是否被修改
|
/// 配置数据是否被修改
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -275,23 +275,23 @@ namespace YooAsset.Editor
|
||||||
|
|
||||||
public static bool HasActiveRuleName(string ruleName)
|
public static bool HasActiveRuleName(string ruleName)
|
||||||
{
|
{
|
||||||
return _cacheActiveRuleTypes.Keys.Contains(ruleName);
|
return _cacheActiveRuleTypes.ContainsKey(ruleName);
|
||||||
}
|
}
|
||||||
public static bool HasAddressRuleName(string ruleName)
|
public static bool HasAddressRuleName(string ruleName)
|
||||||
{
|
{
|
||||||
return _cacheAddressRuleTypes.Keys.Contains(ruleName);
|
return _cacheAddressRuleTypes.ContainsKey(ruleName);
|
||||||
}
|
}
|
||||||
public static bool HasPackRuleName(string ruleName)
|
public static bool HasPackRuleName(string ruleName)
|
||||||
{
|
{
|
||||||
return _cachePackRuleTypes.Keys.Contains(ruleName);
|
return _cachePackRuleTypes.ContainsKey(ruleName);
|
||||||
}
|
}
|
||||||
public static bool HasFilterRuleName(string ruleName)
|
public static bool HasFilterRuleName(string ruleName)
|
||||||
{
|
{
|
||||||
return _cacheFilterRuleTypes.Keys.Contains(ruleName);
|
return _cacheFilterRuleTypes.ContainsKey(ruleName);
|
||||||
}
|
}
|
||||||
public static bool HasIgnoreRuleName(string ruleName)
|
public static bool HasIgnoreRuleName(string ruleName)
|
||||||
{
|
{
|
||||||
return _cacheIgnoreRuleTypes.Keys.Contains(ruleName);
|
return _cacheIgnoreRuleTypes.ContainsKey(ruleName);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static IActiveRule GetActiveRuleInstance(string ruleName)
|
public static IActiveRule GetActiveRuleInstance(string ruleName)
|
||||||
|
|
|
@ -67,7 +67,7 @@ namespace YooAsset
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 子资源对象集合
|
/// 子资源对象集合
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public UnityEngine.Object[] AllAssetObjects
|
public IReadOnlyList<UnityEngine.Object> AllAssetObjects
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
|
|
|
@ -67,7 +67,7 @@ namespace YooAsset
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 子资源对象集合
|
/// 子资源对象集合
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public UnityEngine.Object[] AllAssetObjects
|
public IReadOnlyList<UnityEngine.Object> AllAssetObjects
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
|
|
|
@ -344,7 +344,7 @@ namespace YooAsset
|
||||||
if (string.IsNullOrEmpty(location) == false)
|
if (string.IsNullOrEmpty(location) == false)
|
||||||
{
|
{
|
||||||
// 检查路径末尾是否有空格
|
// 检查路径末尾是否有空格
|
||||||
int index = location.LastIndexOf(" ");
|
int index = location.LastIndexOf(' ');
|
||||||
if (index != -1)
|
if (index != -1)
|
||||||
{
|
{
|
||||||
if (location.Length == index + 1)
|
if (location.Length == index + 1)
|
||||||
|
|
|
@ -1,9 +1,7 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Text;
|
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Security.Cryptography;
|
using System.Security.Cryptography;
|
||||||
|
using System.Text;
|
||||||
|
|
||||||
namespace YooAsset
|
namespace YooAsset
|
||||||
{
|
{
|
||||||
|
@ -29,7 +27,7 @@ namespace YooAsset
|
||||||
if (string.IsNullOrEmpty(str))
|
if (string.IsNullOrEmpty(str))
|
||||||
return str;
|
return str;
|
||||||
|
|
||||||
int index = str.LastIndexOf(".");
|
int index = str.LastIndexOf('.');
|
||||||
if (index == -1)
|
if (index == -1)
|
||||||
return str;
|
return str;
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue