Development Merge 2025.04.01 #1

Merged
Syntriax merged 32 commits from development into main 2025-04-01 19:20:18 +03:00
Showing only changes of commit 5756b96002 - Show all commits

View File

@ -77,7 +77,6 @@ public class HierarchyObject : BaseEntity, IHierarchyObject
if (previousParent is not null)
{
previousParent.RemoveChild(this);
previousParent.OnParentChanged -= NotifyChildrenOnParentChange;
previousParent.OnActiveChanged -= OnParentActiveChanged;
}
@ -86,7 +85,6 @@ public class HierarchyObject : BaseEntity, IHierarchyObject
if (parent is not null)
{
parent.AddChild(this);
parent.OnParentChanged += NotifyChildrenOnParentChange;
parent.OnActiveChanged += OnParentActiveChanged;
}
@ -113,14 +111,6 @@ public class HierarchyObject : BaseEntity, IHierarchyObject
OnChildrenRemoved?.Invoke(this, parent);
}
private void NotifyChildrenOnParentChange(IHierarchyObject sender, IHierarchyObject? previousParent, IHierarchyObject? newParent)
{
// TODO No idea how logical this is to propagate this to the children the way I'm doing right now.
// I was originally gonna just call `child.OnParentChanged?.Invoke(child, child.parentTransform);` but seems an unnecessary call too?
foreach (IHierarchyObject child in Children) // TODO CHECK ERRORS
child.SetParent(this);
}
protected virtual void OnAssign(IBehaviourController behaviourController) { }
public bool Assign(IBehaviourController behaviourController)
{