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. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

[5.3.1] meta file size is multiple growing

Discussion in 'Editor & General Support' started by sheng319, Jan 12, 2016.

  1. sheng319

    sheng319

    Joined:
    Jun 23, 2014
    Posts:
    34

    • [rect count] => [meta file size]
    • 10 => 2kb
    • 20 => 5kb
    • 30 => 141kb
    • 40 => 285kb
    • 50 => 600kb
    • 60 => 999kb
    • 70 => 1498kb
    • 80 => 2129kb
    • 90 => 3301kb
    • 100 => 3491kb
    In my real project, on Unity 5.2.3p3:



    After sprite editor on Unity 5.3.1p1/5.3.1p2:



    And my computer getting slower and slower.
    Even some computer has been unable to open the project.
    This problem is very troubled us.
    Hope you can fix as soon as possible.
    Thank you.
     
  2. sheng319

    sheng319

    Joined:
    Jun 23, 2014
    Posts:
    34
    By the way, if you open a new project on 5.3.1, this problem will not necessarily happen. But if you upgrading from previous version, a big chance of this problem will occur.
     
  3. Immanuel-Scholz

    Immanuel-Scholz

    Joined:
    Jun 8, 2013
    Posts:
    221
    Have you looked into the meta file to get an idea which areas are growing there? Also, you could file a bug report with a small repro case.

    Finally, a work around might be to use PNG or TGA instead of PSD files for now. (Save the PSD files somewhere else and export them into your Assets folder as PNG).
     
  4. sheng319

    sheng319

    Joined:
    Jun 23, 2014
    Posts:
    34
  5. Immanuel-Scholz

    Immanuel-Scholz

    Joined:
    Jun 8, 2013
    Posts:
    221
  6. sheng319

    sheng319

    Joined:
    Jun 23, 2014
    Posts:
    34
    Still occur on 5.3.1p3...
     
  7. 1SIDev

    1SIDev

    Joined:
    Jan 20, 2016
    Posts:
    1
    Hi people out there, Im having the same problem as sheng319.

    My project was migrated from unity 4.6.0f1 to unity 5.3.0f4, and I started noticing an annoying freeze every time I do any modification to an atlas through the sprite editor tool. Then I realized that the meta file was too large and that it was probably the cause of my freezes (some times crashes to desktop).
    -So, I created a new proyect, then import my texture (atlas).
    -Unity creates a meta file of 1KB
    -Modify the import settings: TextureType=Sprite(2D and UI) and Sprite Mode = Multiple
    -Unity meta is now 143KB (338 sprites)
    -Make a backup of this meta file
    -Modify the name of one of those sprites inside the Sprite Editor window
    -Unity freezes for 1 min aprox after I press the apply button
    -Unity meta is now 132.5MB
    Then I compare the meta file with the one I backed up earlier (using a text editor) and then I notice that the difference is +4.4 million lines of text (5973 lines in backup, 4417213 lines after the sprite renamed)
    So I want to know if this is a bug and if someone knows how to fix it please.

    NOTE: the lines that seem to grow up are the ones that concern to the tag "outline" (whatever this tag/property means, cause it wasn't in unity 4.6.x).

    NOTE 2: I've attached the txt files with the same text as the meta file before renaming the sprite and another file with the first 6000 lines of the meta file after renaming the sprite (I cant upload the file with +4.4 lines cause of the size).
     

    Attached Files:

  8. Kuan

    Kuan

    Unity Technologies

    Joined:
    Jul 2, 2014
    Posts:
    87
    Hi @sheng319 and @1SIDev.

    We have a fix and currently in the pipe to the next 5.3.x release. I will update here once I have a definite version that contain this fix.

    Really sorry for the inconvenient caused.
     
  9. Suminell

    Suminell

    Joined:
    Feb 24, 2014
    Posts:
    15
    Hi there. Any news on this fix? I've just check my sprite page .meta files and they are also full of seemingly superfluous "outline" data to the point that the sprite editor is now just hanging.

    E.
     
  10. Suminell

    Suminell

    Joined:
    Feb 24, 2014
    Posts:
    15
    Hi there,

    Just downloaded the 5.3.2 update and it looks like this issue is still present? Could you please let us know if there is a fix imminent?

    E.
     
  11. Kuan

    Kuan

    Unity Technologies

    Joined:
    Jul 2, 2014
    Posts:
    87
    Hi all,

    Patch 5.3.2p1 should contain the correct fix. As we cannot remove existed meta file data, I afraid for affected texture, you will need to do a reset (using the setting icon of the texture importer as shown here)

    TextImporterSetting.png

    or slice the texture again with the Sprite Editor. Please tell me if this fix the issue for you.

    Thank you for your patient.
     
  12. Suminell

    Suminell

    Joined:
    Feb 24, 2014
    Posts:
    15
    Hey thanks!

    That would appear to have done the trick - the sprite editor is no longer hanging when the apply button is pressed and the sprites are behaving as expected. I checked out the associated meta file and say that there is still a fair bit of "outline" data in there - just out of curiosity, what is "outline", what is it derived from and and is it necessary to have it?

    Thanks again, E.
     
  13. Kuan

    Kuan

    Unity Technologies

    Joined:
    Jul 2, 2014
    Posts:
    87
    @Suminell, thanks for verifying the fix. A fair bit of outline data is totally fine. It was part of the new feature we used in the new 2D placeholder asset creation tool, and also laying some groundwork for the future works.
     
  14. DenisM

    DenisM

    Joined:
    Dec 6, 2013
    Posts:
    62
    Hi. I got near all of my textures atlases hit by this issue. I cant reset them because its a lot of work. Can i write script which will open metafile and delete this outline data which increase filesize or it is a needed part of spriteatlas? What will happen if i just delete all of this outline data?


    Code (CSharp):
    1.  
    2. outline:
    3.       - - {x: 3.5, y: 33.5}
    4.         - {x: -40.5, y: 33.5}
    5.         - {x: -40.5, y: -11.5}
    6.         - {x: -18.5, y: -33.5}
    7.         - {x: 16.5, y: -33.5}
    8.         - {x: 32.5, y: -22.5}
    9.         - {x: 40.5, y: -3.5}
    10. ....
    11. ....
    12.  
     
  15. Kuan

    Kuan

    Unity Technologies

    Joined:
    Jul 2, 2014
    Posts:
    87
    @DenisM the data, as long as you are not using the polygon sprite, they are not useful now. You can try to delete them manually, if that works for you, though I am not recommending it. And make sure you upgraded to the later Unity that contains the fix.
     
  16. DenisM

    DenisM

    Joined:
    Dec 6, 2013
    Posts:
    62
    I wrote simple app to fix meta file size. Put your metafiles in to folder with metafilefix.exe, then run metafilefix.
     

    Attached Files:

    Last edited: Apr 1, 2016
    majman and intbrk like this.
  17. intbrk

    intbrk

    Joined:
    Dec 28, 2013
    Posts:
    2
    Thanks! You've saved me alot of time.
     
  18. mowax74

    mowax74

    Joined:
    Mar 3, 2015
    Posts:
    94
    Thanks DenisM, your Script saved us a lot of time too!
    We defined around 100 sprites out of an gui texture atlas for all our gui elements.
    The meta file had a size of around 102MB! What a bug! Now its back to normal, around 70kB. Before, I couldn't load the scenes anymore.
    It was also not an option, like it was told us from unity officials, to rearrange all those sprites by hand...