mirror of
https://github.com/DCFApixels/DragonECS-Unity.git
synced 2025-09-17 17:34:34 +08:00
Update DefinesUtility.cs
This commit is contained in:
parent
2eeffaf74f
commit
f4060688fd
@ -11,8 +11,8 @@ namespace DCFApixels.DragonECS.Unity.Internal
|
||||
public static Symbols[] LoadDefines(Type defineConstsType)
|
||||
{
|
||||
const BindingFlags REFL_FLAGS = BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic;
|
||||
var fields = defineConstsType.GetFields(REFL_FLAGS);
|
||||
return fields.Where(o => o.FieldType == typeof(bool)).Select(o => new Symbols(o.Name, (bool)o.GetValue(null))).ToArray();
|
||||
var fields = defineConstsType.GetFields(REFL_FLAGS).Where(o => o.FieldType == typeof(bool)).Where(o => o.GetCustomAttribute<ObsoleteAttribute>() == null);
|
||||
return fields.Select(o => new Symbols(o.Name, (bool)o.GetValue(null))).ToArray();
|
||||
}
|
||||
|
||||
public static void ApplyDefines(IEnumerable<Symbols> defines)
|
||||
|
Loading…
Reference in New Issue
Block a user