Replace preload/splash scene

Is it possible to replace the default preload/splash scene?

1 Like

Yes, you can customize it in the templates, they are located in the App directory

editor/static/build-templates/shares/main.js

In which, you can find setLoadingDisplay which controls the splash screen display.

4 Likes

Thank you very much for your answer.
That’s a very good news and it confirms thah Cocos Creator is an amazing tool :smile:

Im unable to find this. Do you mean inside Cocos Creator package? (I work on Mac)

It’s inside the App content package, but in 1.4 beta it would be easier to achieve that, you don’t need to modify any thing in the App package (in mac you won’t be able to do so):

  1. you can create a build-templates folder in your project path.
  2. Add a sub folder with the same name as the build template: web-mobile, web-desktop, jsb-default, etc.
  3. Finally add your customized main.js or index.html or anything you need to replace.
  4. At build phase your customized files will be copied to replace the engine template file in your build path.
3 Likes

hi @pandamicro ,
I am using cocos creator v2.1.0 on a MAC. I want to know if there is a way to put a splash screen in my game. please detail the steps. I already tried to create a build-templates folder in the project path…then a jsb-default folder inside it and copied a splash.png into that folder. upon building the project the file splash.png gets copied into the build/jsb-default folder but when I build the app and run it on my android device I don’t see anything.
what should I be doing?
thanks!

check this and other posts linked in replies

1 Like

hi @Musab @pandamicro ,
the posts don’t provide an answer for the simple requirement of a splash screen before the first screen loads. we definitely need to get one of the engine programmers to answer the question. it should be a very basic thing to do and should work across all platforms. and to make the first scene the splash is no solution as the game will still take time to load and the device screen will be blank for that time.
thanks!

2 Likes

i agree on that there should be an easier way but as i said if you checked other post links provided as reply to that post you would see its not that hard either

here are the links