I have to restart the ide again… and it will be fine
Just change to the mini-game platform’s own playback method
We also made some optimizations ourselves, such as adding jsEngineStarted=false in AppDelegate.cpp, and jsEngineStarted=true after the game is initialized; the start method is no longer executed after jsEngineStarted=true.
Add mNativeInitCompleted and mNeedToPause in RunoseAI2dxRenderer, set mNativeInitCompleted to true at the beginning of the onSurfaceCreated method, and judge mNativeInitCompleted at the beginning of the onDrawFrame method. If it is true, it will not continue to execute.
At the same time, when the game is initialized, the Android side waits for js to be loaded before calling the js method through jsb.
The above methods have some effect, but the effect is not great, only from 1.4% to 1.2%, far from our target of 0.3%.
I downloaded the demo and tried it. The editor and simulator did have problems, but the browser was normal. Version 3.8.5 It is recommended to refer to the effect after the build.