@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/module.js
CHANGED
|
@@ -6611,21 +6611,9 @@ var ComponentCloner = /*#__PURE__*/ function() {
|
|
|
6611
6611
|
* Clear children entities.
|
|
6612
6612
|
*/ _proto.clearChildren = function clearChildren() {
|
|
6613
6613
|
var children = this._children;
|
|
6614
|
-
|
|
6615
|
-
|
|
6616
|
-
|
|
6617
|
-
child._siblingIndex = -1;
|
|
6618
|
-
var activeChangeFlag = ActiveChangeFlag.None;
|
|
6619
|
-
child._isActiveInHierarchy && (activeChangeFlag |= ActiveChangeFlag.Hierarchy);
|
|
6620
|
-
child._isActiveInScene && (activeChangeFlag |= ActiveChangeFlag.Scene);
|
|
6621
|
-
activeChangeFlag && child._processInActive(activeChangeFlag);
|
|
6622
|
-
Entity._traverseSetOwnerScene(child, null); // Must after child._processInActive().
|
|
6623
|
-
child._setParentChange();
|
|
6624
|
-
}
|
|
6625
|
-
children.length = 0;
|
|
6626
|
-
// Dispatch a single `Child` modify event for the whole clear so subscribers
|
|
6627
|
-
// (e.g. UICanvas) can invalidate their cached hierarchy state once.
|
|
6628
|
-
this._dispatchModify(EntityModifyFlags.Child, this);
|
|
6614
|
+
while(children.length > 0){
|
|
6615
|
+
children[children.length - 1]._setParent(null);
|
|
6616
|
+
}
|
|
6629
6617
|
};
|
|
6630
6618
|
/**
|
|
6631
6619
|
* Clone this entity include children and components.
|