FIx bug animation not stop. add more QOL for test animation scene. add AnimationSceneSkillTest.md to show how to use

This commit is contained in:
Tran Hai Nam
2026-05-20 15:16:24 +07:00
parent 7301f9897c
commit d2aa2c8001
45 changed files with 118360 additions and 23 deletions
@@ -493,25 +493,27 @@ namespace BrewMonster.Scripts
/// <returns>True if the key exists, false otherwise.</returns>
public static bool KeyExists(object key, System.Type type = null)
{
string keyStr = key?.ToString();
if (string.IsNullOrEmpty(keyStr))
return false;
#if UNITY_EDITOR
return !Instance._invalidAssetPaths.Contains(key.ToString());
#else
// Iterate through all loaded locators (catalogs)
// Failed loads are cached; still verify against catalog (do not assume unknown keys exist).
if (Instance != null && Instance._invalidAssetPaths.Contains(keyStr))
return false;
#endif
foreach (IResourceLocator locator in Addressables.ResourceLocators)
{
// If the locator finds the key, it returns true
if (locator.Locate(key, type, out var locations))
if (locator.Locate(key, type, out var locations)
&& locations != null
&& locations.Count > 0)
{
// Double check that it actually yielded at least one location
if (locations != null && locations.Count > 0)
{
return true;
}
return true;
}
}
return false;
#endif
}
#endregion