Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Need advice on build asset size...

Discussion in '2D' started by Footlight14, Aug 14, 2018.

  1. Footlight14

    Footlight14

    Joined:
    Mar 15, 2016
    Posts:
    27
    Hi,

    UNITY 2018.1.8F1

    My game is almost ready, the only worrying thing that is causing me a headache is the loading scene times. Not all scenes take ages, just some in particular and I cannot work out why this is.

    The first scene of two scenes (A to B) for example is instant in loading, but when I move to the second scene ( A to B (fine) then back to A (ages)), it takes forever to load. Also, if I start in scene B, and move to scene A, it is seamless, but when going back to scene B it takes ages, so again, it is not the size of the scene A or B.

    See video here:

    https://www.dropbox.com/s/11xbsta2j0z8c5f/Loadingtimes.mp4?dl=0

    And image of Profiler when: Loadingtimes.png


    I am using preload and have asynchronous set to on.

    Please look at my overall build size:

    Screen Shot 2018-08-13 at 11.20.07.png

    Are my textures overly large?

    I have gone through my long audio files and chosen Compressed In Memory and unticked Preload Audio.

    But this doesn't seem to have changed the loading time.

    Big backgrounds are 4096 pixels.

    See import settings:

    texture editor.png
     

    Attached Files:

  2. Footlight14

    Footlight14

    Joined:
    Mar 15, 2016
    Posts:
    27
    As a test, I removed all the graphics and audio and it still had the delay
     
  3. Footlight14

    Footlight14

    Joined:
    Mar 15, 2016
    Posts:
    27
    Screen Shot 2018-08-14 at 17.52.24.png
    Could it be the number of animation clips? and if so, is there a way to sort this without reducing the number?
     
  4. Footlight14

    Footlight14

    Joined:
    Mar 15, 2016
    Posts:
    27
    Removed all animations, didn't really make much difference
     
  5. netramz

    netramz

    Joined:
    May 22, 2018
    Posts:
    16
    I couldn't really think of many reasons why scene loading would take an extra long amount of time, especially when loading one originally is fine, but then loading another and coming back is way worse. The main thing that stuck out to me as I read your post is that you are using asynchronous loading. Now, I am very new to Unity, but doesn't this mean that you are loading a scene in the background while maintaining the current scene? Are you sure you are "getting rid of" the last scene that is used during the asynchronous load properly? That is just about the only reason I could think of that would cause a scene to take longer to load than before, but again, I do not have very much experience with loading many different scenes.