You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To reproduce setup an Entity in the Editor like so:
Parent
- Child1
- Child2
Disable the Parent.
Add a script to Child1 that destroys it in initialize like so:
TestScript.prototype.initialize = function () { this.entity.destroy(); }
Create another script to clone the parent like so:
var clone = Parent.clone();
clone.enabled = true;
this.app.root.addChild(clone);
Notice there is an error thrown because in pc.Entity#_notifyHierarchyStateChanged we loop through the children of an entity and since we destroy one of its children that loop is invalid.
The text was updated successfully, but these errors were encountered:
To reproduce setup an Entity in the Editor like so:
Disable the Parent.
Add a script to Child1 that destroys it in
initialize
like so:TestScript.prototype.initialize = function () { this.entity.destroy(); }
Create another script to clone the parent like so:
Notice there is an error thrown because in pc.Entity#_notifyHierarchyStateChanged we loop through the children of an entity and since we destroy one of its children that loop is invalid.
The text was updated successfully, but these errors were encountered: