engine icon indicating copy to clipboard operation
engine copied to clipboard

The onupdate of the Script may not be triggered under certain circumstances

Open cptbtptpbcptdtptp opened this issue 3 years ago • 2 comments

Initialization does not override onupdate, and update onupdate after the onEnable function will not execute onupdate in the frame loop.

cptbtptpbcptdtptp avatar Nov 30 '21 04:11 cptbtptpbcptdtptp

image

cptbtptpbcptdtptp avatar Nov 30 '21 04:11 cptbtptpbcptdtptp

If we adopt this way: entity.addComponent(SomeScript).onUpdate = () => {}; it will compromise the overall performance of the engine. We need to observe how many users are using this method before making a decision.

luzhuang avatar Aug 08 '23 03:08 luzhuang