Forum rules - please read before posting.

Preload scene - possible bug and/or am I doing it wrong?

I have the following flow of scenes for my game, from startup:

splash screen scene
(loading)
main menu scene -> choose new game
(loading)
game scene

This works perfectly, with the loading scene working through AC and showing loading progress. Everything is fine there.

But, I decided to start toying with scene preloading in an effort to reduce load times, and that's where the problem has come up. If I have a loading screen enabled, and preload the next scene, when AC attempts to actually load that next scene, the game freezes. I've tested this in a blank project and it does the same thing. Without a loading screen, however, preloading doesn't cause any problems. I think this is a bug.

But this leads me to another question: how exactly should we be using preloading? I noticed that the action is a dead-end; I can't have another action after it (in, for example, the on-scene start cutscene of my splash screen). So I set up a separate action list (set to run in the background) which is then called as the scene starts, and then the rest of the cutscene plays out (wait, camera fade, etc).

Is this the correct procedure, or is there a better way to preload scenes? I kept an eye on my RAM usage while testing and it doesn't seem like the preloading is actually doing anything. I certainly haven't noticed any decrease in loading times.

Any help would be appreciated!

Comments

  • Not being able to chain any more Actions after preloading is a bug - thanks for the alert.

    I'm not sure if the main issue here is actually down to Unity or AC.  The way Unity handles scene changing has also changed much with 5.3 - which version are you using?

    I've always assume that when you preload, it'll only make a difference if that scene is the next one to actually get switched to - in which case, loading scenes and preloading can't really be used together, as the preload data will be discarded by Unity when the loading scene is loaded.
  • I'm still on 5.2.1. Unity 5.3 had too many problems for me to deal with so far into development.

    Actually, when you say it like that, it makes complete sense!

    I'll put in a fake loading screen (maybe just a single frame) just before the scene change and keep that image on-screen. I seem to remember reading something about that in the AC manual. Pity that it's one or the other though - having a loading bar adds a nice bit of polish to the overall experience.

    Thanks for clearing that up. I'll do a bit more digging and see if I can provide any useful information, but for now I'll assume that the correct procedure is to choose either preloading or a loading screen.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.