| | |
| | | using UnityEngine; |
| | | using UnityEngine; |
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | | using Cysharp.Threading.Tasks; |
| | |
| | | T asset = null; |
| | | |
| | | 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 |
| | | // TODO YYL 还是要找到字符串问题 |
| | | path = System.Text.RegularExpressions.Regex.Replace(path, @"[\p{C}]", ""); |
| | | asset = UnityEditor.AssetDatabase.LoadAssetAtPath<T>(path); |
| | | #endif |
| | | } |