mirror of
https://github.com/DCFApixels/DragonECS.git
synced 2025-09-18 01:44:35 +08:00
Update MetaGroupAttribute.cs
This commit is contained in:
parent
bea20d57f0
commit
7ef556556b
@ -28,8 +28,9 @@ namespace DCFApixels.DragonECS
|
||||
}
|
||||
public class MetaGroup
|
||||
{
|
||||
public static readonly MetaGroup Empty = new MetaGroup("");
|
||||
private static string _pattern = @"Module(?=/)";
|
||||
public const string UNGROUPED = "<UNGROUPED>";
|
||||
private const string PATTERN = @"Module(?=/)";
|
||||
public static readonly MetaGroup Empty = new MetaGroup(UNGROUPED);
|
||||
|
||||
public readonly string Name;
|
||||
private string[] _path = null;
|
||||
@ -48,7 +49,7 @@ namespace DCFApixels.DragonECS
|
||||
{
|
||||
if (string.IsNullOrEmpty(name))
|
||||
{
|
||||
Name = string.Empty;
|
||||
Name = UNGROUPED;
|
||||
return;
|
||||
}
|
||||
name = name.Replace('\\', SEPARATOR);
|
||||
@ -56,7 +57,7 @@ namespace DCFApixels.DragonECS
|
||||
{
|
||||
name += SEPARATOR;
|
||||
}
|
||||
Name = Regex.Replace(name, _pattern, "");
|
||||
Name = Regex.Replace(name, PATTERN, "");
|
||||
Name = string.Intern(Name);
|
||||
}
|
||||
public override string ToString() { return Name; }
|
||||
|
Loading…
Reference in New Issue
Block a user