diff --git a/Runtime/LibEcs/GroupCore.cs b/Runtime/LibEcs/GroupCore.cs index 29db1858..2e102e67 100644 --- a/Runtime/LibEcs/GroupCore.cs +++ b/Runtime/LibEcs/GroupCore.cs @@ -37,8 +37,8 @@ public abstract class GroupCore : IEnumerable, IEquatable, IDisposabl internal Layer layer; #if ACTORS_EVENTS_MANUAL - public ents added; - public ents removed; + public ents added = new ents(); + public ents removed = new ents(); internal bool hasEventAdd; internal bool hasEventRemove; @@ -89,7 +89,7 @@ internal void SetSelf(Op op, Processor pr) if ((op & Op.Add) == Op.Add) { if (added == null) - added = new ents(Framework.Settings.SizeEntities); + added = new ents(LayerKernel.Settings.SizeEntities); hasEventAdd = true; } @@ -97,7 +97,7 @@ internal void SetSelf(Op op, Processor pr) if ((op & Op.Remove) == Op.Remove) { if (removed == null) - removed = new ents(Framework.Settings.SizeEntities); + removed = new ents(LayerKernel.Settings.SizeEntities); hasEventRemove = true; } diff --git a/Runtime/LibProcessors/ProcessorEcs.Handle.Groups.cs b/Runtime/LibProcessors/ProcessorEcs.Handle.Groups.cs index 78e87e53..0eba03c4 100644 --- a/Runtime/LibProcessors/ProcessorEcs.Handle.Groups.cs +++ b/Runtime/LibProcessors/ProcessorEcs.Handle.Groups.cs @@ -41,11 +41,11 @@ internal void Add(object obj) if (!myFieldInfo.FieldType.IsSubclassOf(groupType)) continue; #if ACTORS_EVENTS_MANUAL - // in case we are looking at the group of the derived processor we want to check it's events - if (inner == null) - { - groupEv = Attribute.GetCustomAttribute(myFieldInfo, typeof(EventsAttribute)) as EventsAttribute; - } + // in case we are looking at the group of the derived processor we want to check it's events + // if (inner == null) + // { + groupEv = Attribute.GetCustomAttribute(myFieldInfo, typeof(EventsAttribute)) as EventsAttribute; + //} #endif var groupByAttribute = Attribute.GetCustomAttribute(myFieldInfo, typeof(GroupByAttribute)) as GroupByAttribute; @@ -96,10 +96,10 @@ internal void Add(object obj) #if ACTORS_EVENTS_MANUAL - if (groupEv != null) - { - group.SetSelf(groupEv.op, b as Processor); - } + if (groupEv != null) + { + group.SetSelf(groupEv.op, obj as Processor); + } #endif } }