Forum rules - please read before posting.

Scene Pre loader script

hi, do you reckon it’s possible to write or buy a unity pre loader unity script that would always have scenes all pre loaded in adventure creator to get rid of loading times?

Comments

  • AFAIK, it's only possible to preload one scene at a time.  If you preload 2 scenes, the first will be forgotten.

    General Unity questions are best asked on the Unity forums, however.
  • ok thanks. I think I am doing something wrong using the preload scene action.

    I use the action list as shown in the tutorial and manual, and I see this in the current scene on start - see screenshot:

    https://www.dropbox.com/sh/sdtzglznih72kdt/AADk0lnbvFoZfVNo5DxVl1DMa?dl=0

    But, it constantly says isLoading for the whole scene, no matter how long I am in there, and then when it comes to the next scene loading, is not instant, and almost seems to take as long?

    Am i missing something?

    Thanks

    James
  • The (is loading) text in the Hierarchy is part of Unity and I'm not privvy to its inner workings.  However, checking "Preload only" in the Scene: Switch Action won't switch the scene once the preloading is complete.

    Another Scene: Switch Action (without the option ticked), that refers to the same next scene, must then be run in order to complete the scene change.

    I shall test scene preloading in 2017.4, but the above should be the correct workflow.
  • ok thanks. I think I am doing something wrong using the preload scene action.

    I use the action list as shown in the tutorial and manual, and I see this in the current scene on start - see screenshot:


    But, it constantly says isLoading for the whole scene, no matter how long I am in there, and then when it comes to the next scene loading, is not instant, and almost seems to take as long?

    Am i missing something?

    Thanks

    James
  • Plu, latest AC, latest Unity ( happened this way since early 2017 AC and Unity) and Asynchronously on too)
  • No need to re-post your previous message.

    The "Is loading" message is not going to go away - again, you need a separate such Action to load the scene when you want.  I can't see any issue on the AC side of things - it does preload the scene as intended.  What effect this workflow actually has is done to Unity as well as the contents of the scene.

    Be sure to follow Unity's own recommendations for optimising your game's assets, as well as going over the "Performance and optimisations" chapter of the AC Manual.
  • When I make my build, it just hangs after switching scene. At the beginning of the cutscene I do scene switch preload data, allow the cutscene to run, and then when i go to actually change to that scene, it just gets stuck on loading scene. and never loads. 
    • I add action scene switch preload data at start of cutscene
    • at end of cutscene i click on room to switch to, hotspot has switch scene
    • it goes to loading scene and just hangs for good
    • when i don't have scene switch pre load data it doesn't hang, and just loads

    i do not understand why and this has happened every time i have tried to use this over the past two years, across many AC and Unit yversions


  • Would this happen if it hadn't finished loading in time to the actual switching scenes event?

  • AFAIK Unity can only pre-load one scene at a time, and if you then switch to a loading scene in between pre-loading and loading-proper, then I assume that the pre-load data is lost.  I'd expect it that the choice would be one-or-the-other, not both.

    You hadn't mentioned your use of a loading scene - if you disable it, does it hang?
  • It is a loading menu I am using, and yes it still hangs if I disable it. It seems that if a scene has more than one scene got go to, and I pre load a scene, when trying to use a different one, in hangs, but they pre loaded scene works? so would this mean that you can only preload a scene that is going to be used next?
  • Again, AFAIK you can only pre-load one scene at a tine, so you should generally only preload the scene that'll next be visited.  Getting it wrong shouldn't cause a hang, but that may be an issue with Unity.
  • I have another question regarding this. It seems when I first start visiting scenes, they load nice and speedy due to the pre load function, however, on frequent visits, it seems to get slower and slower, any reason why this might be? I am pre scene loading. Latest Unity 2018.16f1. Latest AC
  • There's no detail for me to go on, but running a Deep Profile should reveal some information.

    Also be mindful of the tips given in the Manual's "Performance and optimisation" chapter, particuarly #3.
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.