getPath method
Returns the path from the root down to this one, inclusive.
Implementation
List<ECSBase<T>> getPath() {
List<ECSBase<T>> path = [];
ECSBase<T>? current = this;
while (current != null) {
path.insert(0, current);
final parent = current.parent;
if (parent != this) {
current = parent;
} else {
break;
}
}
return path;
}