engine
engine copied to clipboard
The onupdate of the Script may not be triggered under certain circumstances
Initialization does not override onupdate, and update onupdate after the onEnable function will not execute onupdate in the frame loop.
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.