Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by Morphello · Sep 14, 2018 at 06:59 AM · sizescenesfilesmerge

.unity scene file size sudden increase after merge attempt. Contains deleted [SerializeField] data. How to clean the file?

Hi everyone!


TL;DR: Unity file size shot up 20x when trying to merge. Seems to contain deleted serialized data. How to clean/prevent in the future?


I'm quite new to Unity and coding in general and we've encountered this little issue suddenly with the physical file size of our .unity files.


We've been using Git as a way to keep some version control for our game which is a small puzzle game based entirely on canvas/UI elements. When we forked our code base to work on it separately, the size of the .unity file for our main scene was about 30kb. We each worked on our portion of the game a little bit then we attempted to merge. At this stage our unity scenes were about 40kb each.


We attempted several methods of merging our game, since we were both using the same scene, we attempted to merge with YAMLmerge and P4Merge. We couldn't get that to work so we attemped to discard the merge changes and try again with Tortoisemerge, but again we had no luck. We ended up just saving our scene under a different name, exporting it as a package, and importing it into the other copy of the game and copying everything relevant over.


After this process was complete, our .unity scene file size was 900kb. While it doesn't seem like much, compared to the 40kb sizes we were working with, there's some sort of sudden increase. We're also trialing Unity Collab now, and uploading 1mb scene files everytime you want to change a variable in a serialized field takes a while. I attempted to create a new scene, copy everything over and then save the new scene, but it was exactly the same size as before.


After investigating the .unity file with a text editor, I found lots of data belonging to variables that have been [SerializeField]. However, most of the variables in the .unity file were old and had been deleted long ago. I found a reference to a deleted array that we threw a huge bunch of data in, in the .unity file and deleted it, reducing the total file size to 470kb. There seems to be more but currently there are 15,000 lines of text in here in a not very human readable format.


There is a reference to YAMLmerge at the top of the file as well, so maybe it's some old merge data that hasn't been cleaned away, or we've done something wrong. Either way, this seems like a small issue now but it may become a larger one if we continue to make the mistakes that lead us to this point. What is causing the file size to bloat out? How can we prevent it? Is there a way to clean our current file back to exactly what the scene contains and no irrelevant data?


Thanks for your time!

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

0 Replies

· Add your reply
  • Sort: 

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

89 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Scenes weight 100mb , around 50% of the build 2 Answers

Size increasing everytime i add new level in seperate scenes 1 Answer

issue regarding image file sizes 0 Answers

How to merge scenes in Unity? 4 Answers

New Game Object Same Scene 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges