Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

remove event ondestroy playcanvas

pc.Entity.prototype.destroyOld = pc.Entity.prototype.destroy;
pc.Entity.prototype.destroy = function() {
    this.fire('beforedestroy', this);
    pc.Entity.prototype.destroyOld.apply(this);
}
 
PREVIOUS NEXT
Tagged: #remove #event #ondestroy #playcanvas
ADD COMMENT
Topic
Name
3+1 =