yyl
2025-06-05 8b9a51ddfef35f9b41b7f5bc5271ceab62877b08
Main/ResModule/ResManager.cs
@@ -8,6 +8,8 @@
using System.IO;
using UnityEngine.Networking;
using UnityEngine.Video;
using System.Reflection;
#if UNITY_EDITOR
@@ -139,8 +141,8 @@
    {
        T asset = null;
        var path = string.Concat($"Assets/ResourcesOut/{directory}/{name}", GetExtension(typeof(T))).Replace("//", "/").Trim().Replace("\\", "/");
        var path = ($"Assets/ResourcesOut/{directory}/{name}" + GetExtension(typeof(T))).Replace("//", "/").Trim().Replace("\\", "/");
        path = System.Text.RegularExpressions.Regex.Replace(path, @"[\p{C}]", "");
        if (AssetSource.uiFromEditor)
        {
#if UNITY_EDITOR
@@ -163,12 +165,12 @@
    private Sprite LoadSprite(string atlasName, string spriteName)
    {
// #if !UNITY_EDITOR
#if !UNITY_EDITOR
        SpriteAtlas atlas = LoadAsset<SpriteAtlas>("Sprite", atlasName.Replace("Sprite/", ""));
        return atlas.GetSprite(spriteName);
// #else
        // return ResManager.Instance.LoadAssetInternal<Sprite>(atlasName, spriteName);
// #endif
#else
        return ResManager.Instance.LoadAssetInternal<Sprite>(atlasName, spriteName);
#endif
    }
    public void LoadAssetAsync<T>(string directory, string name, Action<bool, UnityEngine.Object> callBack) where T : UnityEngine.Object