Search Unity

Scene size bloating

Discussion in 'Editor & General Support' started by Keeul, Mar 15, 2021.

  1. Keeul

    Keeul

    Joined:
    Mar 18, 2015
    Posts:
    11
    I am using unity 2020.1.17. Something I have noticed is the scene I have been working in has been bloating bigger and bigger. The scene itself contains a quarter of the assets that my 100mb scene does yet it is over 450MB. I have tried removing assets, changing texture compression settings, prefabing everything and removing all all audio from the scene, the file size has not changed. I have tried exiting and re-entering to see if it was just not re-serialising after the changes but its exactly the same size.

    Most of my materials are texture atlases, I use vegetation studio pro for the vegetation so it spawned at runtime, not in the scene hierarchy. The terrain splatmap and mesh data only adds up to 50mb. Something is not adding up here. Any ideas on what is bloating my scene size?
     
  2. bobisgod234

    bobisgod234

    Joined:
    Nov 15, 2016
    Posts:
    1,042
    Unity .scene files are serialised as YAML text and are human readable. Open up a scene file in a text editor and see if you can see anything suspicious.
     
  3. Keeul

    Keeul

    Joined:
    Mar 18, 2015
    Posts:
    11
    There is a lot of references to Font materials in there, but about 70% of the lines are something like this:

    - {fileID: 1745931641}
    - {fileID: 1745931640}
    - {fileID: 104007344}
    - {fileID: 104007346}
    - {fileID: 104007345}
    - {fileID: 1722286452}
    - {fileID: 1722286454}
    - {fileID: 1722286453}
    - {fileID: 219172401}
    - {fileID: 219172403}
    - {fileID: 219172402}
    - {fileID: 742341556}
    - {fileID: 742341558}
    - {fileID: 742341557}
    - {fileID: 1790241174}
    - {fileID: 1790241176}
    - {fileID: 1790241175}
    - {fileID: 245881754}
    - {fileID: 245881756}
    - {fileID: 245881755}
    - {fileID: 198714868}
    - {fileID: 198714870}
    - {fileID: 198714869}
    - {fileID: 1857506363}
    - {fileID: 1857506365}
    - {fileID: 1857506364}
    - {fileID: 1751254329}
    - {fileID: 1751254331}
    - {fileID: 1751254330}
    - {fileID: 2005017885}
    - {fileID: 2005017887}
    - {fileID: 2005017886}
    - {fileID: 1382592063}
    - {fileID: 1382592065}
    - {fileID: 1382592064}
    - {fileID: 828497708}
    - {fileID: 828497709}
    - {fileID: 51345252}
    - {fileID: 51345254}
     
  4. Keeul

    Keeul

    Joined:
    Mar 18, 2015
    Posts:
    11
    Does anyone have any advice in regards to this? Is it normal for there to be so many Material instances for my TextMesh pro fonts?