Error
June 11, 2022, 7:12am
#1
Cocos create when i am using testing in web browser switch working too much proper but i made android build and test its take too much time to change scene its look like hanging device.
i am using cc.director.loadScene(“scenename”); for changing scene.
if anyone solve then help me to solve out before i am using cocos2dx but i am never face this issue.
@linrm
Thanks
Ronsku
June 12, 2022, 9:43am
#2
I’ve also experienced this since CC3. Even in latest 3.5.1 the scene swap loading times are really long, even if the scene is preloaded!
I think Cocos Creator Devs are aware of this since I’ve seen some scene loading time tests on github issues, but I also think this needs to improve heavily, especially if a scene is already preloaded it should swap instantly.
linrm
June 13, 2022, 10:42am
#3
which version of creator are you using?
Error
June 13, 2022, 11:04am
#4
i am using cocos 2.4.8 @Ronsku using 3.5.1 .
i am also try preloaded still have same issue. take time load new scene
linrm
June 13, 2022, 11:17am
#5
The loading speed depends on the phone you are testing and the complexity of the scene, the performance on the web browser is better than the phone.
Error
June 13, 2022, 1:03pm
#6
i am testing in iqoo Z5 phone with 12GB ram and snapdragon 778G ocata core.
still taking too much time to load. even i test in lower GB ram both getting same time to load new scene.
Thanks
Ronsku
June 14, 2022, 10:36am
#7
I have created a feature request regarding this
opened 10:35AM - 14 Jun 22 UTC
Feature Request
Needs Triage
### Use Case
Related to this ticket: https://github.com/cocos/cocos-engine/issu… es/10935
I use multiple scenes per game to keep everything organized. Just as an example, let's say you are playing a 2D overview game and walk into a door, you run a quick animation that opens the door (covering the whole screen with something) and swap scene mid animation where screen is covered by the animation. This animation could be ran on a persistent node above both scenes. This would make it possible to create a smooth transition from one scene to another.
### Problem Description
Now, depending on the device you are running on the next scenes instantiation could take 100ms or 1000ms you cannot run it mid animation, instead you have to separate the animation into something
Run a "open animation" that covers the screen
Wait for scene swap (100ms 1000ms or how long it takes)
Then run a "close animation" to remove the overlay that covers the screen to reveal the new scene.
Sometimes I've used fade to black 500ms animation, then stay at black until scene has swapped and fade back to from the black overlay in the new scene. Problem here is that I want the swap to be fast and smooth, 500ms fade to black, 500ms fade back to invisible overlay. But since it might take a long time to instantiate the next scene player might be stuck in a black screen for a few seconds wondering "what is going on..?"
### Proposed Solution
This is why it would be amazing to just be able to "await preLaunch()" a scene that does all the heavy lifting and basically instantiates the scene for you in memory and when you then "launchScene()" it would be instant. The same way you would just toggle "node.active = true". And my workaround with placing a scene as persistent node solves this in an ugly way.
### How it works
_No response_
### Alternatives Considered
Make sure preloadScene() not only downloads the assets but also prepares the scene to be launched within a few milliseconds.
### Additional Information
_No response_
I have also discussed this previously in this performance ticket
opened 05:48AM - 05 May 22 UTC
closed 07:43AM - 01 Jun 22 UTC
P0
Optimization
We have moved most classes in 3d assets from JS to cpp. But we continue to depen… d on the deserialization logic in JS which will cause a lot of JSB invocations if loading a large scene.
Therefore, we need to do more performance test and figure out how much performance cost in v3.6.
If the performance of v3.6 is exactly lower than v3.5, we need to find a better way to avoid. For example, we could try to move some of deserialization logic to cpp.
Is is an issue currently, how slow the scene swapping is
system
closed
June 17, 2022, 9:29am
#8
This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.