diff --git a/Convention/[Runtime]/Config.cs b/Convention/[Runtime]/Config.cs index fe7998a..9b122d7 100644 --- a/Convention/[Runtime]/Config.cs +++ b/Convention/[Runtime]/Config.cs @@ -1273,7 +1273,7 @@ namespace Convention } return result; } - public static List SeekMemberInfo([In] object target, IEnumerable names, BindingFlags flags = BindingFlags.Default) + public static List SeekMemberInfo([In] object target, IEnumerable names, BindingFlags flags = BindingFlags.Public | BindingFlags.Instance) { Type _CurType = target.GetType(); List result = _CurType.GetMembers(flags).ToList(); diff --git a/Convention/[Runtime]/File.cs b/Convention/[Runtime]/File.cs index c10134e..142eff4 100644 --- a/Convention/[Runtime]/File.cs +++ b/Convention/[Runtime]/File.cs @@ -79,7 +79,7 @@ namespace Convention } public string GetName(bool is_ignore_extension = false) { - return this.FullPath[..( + var result = this.FullPath[..( (this.FullPath.Contains('.') && is_ignore_extension) ? this.FullPath.LastIndexOf('.') : ^0 @@ -89,6 +89,8 @@ namespace Convention ? ^1 : ^0 )]; + return result[(Mathf.Max(result.Contains('/') ? result.LastIndexOf('/') : -1, + result.Contains('\\') ? result.LastIndexOf('\\') : -1) + 1)..]; } public string GetExtension() {