fix for support 2020.0

This commit is contained in:
Mikhail 2024-04-28 18:56:26 +08:00
parent c3922074ea
commit bd7bb03f64
2 changed files with 4 additions and 3 deletions

View File

@ -17,7 +17,7 @@ namespace DCFApixels.DragonECS
} }
public MetaGroupAttribute(params string[] path) public MetaGroupAttribute(params string[] path)
{ {
Data = new MetaGroupRef(string.Join('/', path)); Data = new MetaGroupRef(string.Join("/", path));
} }
} }
public class MetaGroupRef public class MetaGroupRef
@ -27,13 +27,14 @@ namespace DCFApixels.DragonECS
public readonly string Name; public readonly string Name;
private string[] path = null; private string[] path = null;
private static string pattern = @"Module(?=/)"; private static string pattern = @"Module(?=/)";
private static char[] separatpor = new char[] { '/' };
public IReadOnlyCollection<string> Splited public IReadOnlyCollection<string> Splited
{ {
get get
{ {
if (path == null) if (path == null)
{ {
path = Name.Split('/', StringSplitOptions.RemoveEmptyEntries); path = Name.Split(separatpor, StringSplitOptions.RemoveEmptyEntries);
} }
return path; return path;
} }

View File

@ -34,7 +34,7 @@ namespace DCFApixels.DragonECS.UncheckedCore
} }
public static bool CheckSpanValideDebug(EcsSpan span) public static bool CheckSpanValideDebug(EcsSpan span)
{ {
HashSet<int> set = new HashSet<int>(span.Count); HashSet<int> set = new HashSet<int>();
foreach (var e in span) foreach (var e in span)
{ {
if (set.Add(e) == false) if (set.Add(e) == false)