@galacean/engine-core 0.0.0-experimental-2.0-migrate.1 → 0.0.0-experimental-2.0-migrate.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/main.js +3 -15
- package/dist/main.js.map +1 -1
- package/dist/module.js +3 -15
- package/dist/module.js.map +1 -1
- package/package.json +3 -3
package/dist/main.js
CHANGED
|
@@ -6615,21 +6615,9 @@ var ComponentCloner = /*#__PURE__*/ function() {
|
|
|
6615
6615
|
* Clear children entities.
|
|
6616
6616
|
*/ _proto.clearChildren = function clearChildren() {
|
|
6617
6617
|
var children = this._children;
|
|
6618
|
-
|
|
6619
|
-
|
|
6620
|
-
|
|
6621
|
-
child._siblingIndex = -1;
|
|
6622
|
-
var activeChangeFlag = ActiveChangeFlag.None;
|
|
6623
|
-
child._isActiveInHierarchy && (activeChangeFlag |= ActiveChangeFlag.Hierarchy);
|
|
6624
|
-
child._isActiveInScene && (activeChangeFlag |= ActiveChangeFlag.Scene);
|
|
6625
|
-
activeChangeFlag && child._processInActive(activeChangeFlag);
|
|
6626
|
-
Entity._traverseSetOwnerScene(child, null); // Must after child._processInActive().
|
|
6627
|
-
child._setParentChange();
|
|
6628
|
-
}
|
|
6629
|
-
children.length = 0;
|
|
6630
|
-
// Dispatch a single `Child` modify event for the whole clear so subscribers
|
|
6631
|
-
// (e.g. UICanvas) can invalidate their cached hierarchy state once.
|
|
6632
|
-
this._dispatchModify(EntityModifyFlags.Child, this);
|
|
6618
|
+
while(children.length > 0){
|
|
6619
|
+
children[children.length - 1]._setParent(null);
|
|
6620
|
+
}
|
|
6633
6621
|
};
|
|
6634
6622
|
/**
|
|
6635
6623
|
* Clone this entity include children and components.
|