Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 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 krubba · Sep 20, 2013 at 05:13 PM · iosfile size

Better way to see what contributes to file size?

According to the docs, and several forum answers, the way to see what contributes to file size is to check the editor log ( Unity's doc on reducing file size ). However, all this really tells you is how much memory these assets use at runtime, not the actual file size.

I.e. a 1024 16-bit texture uses 2MB of memory, but on disk it's a PNG of about 600kb. Even worse, I have an 8mb audio clip, but since it streams from disk, it's listed as 0.0kb at the bottom of asset list.

Is there any way to get a break down of actual asset sizes going into the build? I'm working on iOS/Android, though i'm sure there must be a way regardless of platform...

Comment
Add comment · Show 2
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
avatar image krubba · Sep 20, 2013 at 05:20 PM 0
Share

Another curiosity is, I changed sample rate of my large sound clip from 44kHz to 22$$anonymous$$hz, which reduced file size from 16mb to the 8mb, but it made absolutely no difference in the estimated file size of my ios build. Even compressed it should have shaved off at least 1 mb, no?

avatar image Sulbon · Sep 23, 2013 at 03:13 AM 1
Share

Unity recompiles resources(images, audioclips) to some unified format for release package, I guess. though the source format differs the output might be the same.

1 Reply

· Add your reply
  • Sort: 
avatar image
1

Answer by Eric5h5 · Sep 23, 2013 at 04:01 AM

all this really tells you is how much memory these assets use at runtime, not the actual file size.

No, it's the build file size. That's the whole point.

a 1024 16-bit texture uses 2MB of memory, but on disk it's a PNG of about 600kb.

It's never a PNG on disk. Unity does not use the source files at all when making a build. A 1024 16-bit texture uses the same space on disk as it does in RAM.

Comment
Add comment · Show 2 · Share
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
avatar image krubba · Sep 23, 2013 at 04:04 PM 0
Share

I can accept that images are stored in a diff format than png, but I would think whatever format they use uses some kind of compression, thus taking less space on disk than in memory.

At any rate, i still contend the asset list is not the complete build list, since like i mentioned, the largest audio clip (an others) is reported as 0kb. That clip does go into the build, and definitely takes more than 0kb, so the asset list is definitely underreporting...

avatar image Eric5h5 · Sep 23, 2013 at 07:02 PM 0
Share

I would think whatever format they use uses some kind of compression, thus taking less space on disk than in memory.

It doesn't, though. The format on disk is the format that's used directly in VRA$$anonymous$$, so truecolor RGBA on disk uses 4 bytes/pixel, DXT5 uses 1 byte/pixel, etc. (not including mipmaps). The only real exception is web player builds, where the entire file is LZ$$anonymous$$A compressed.

the largest audio clip (an others) is reported as 0kb

I haven't seen that myself, but it sounds like a bug that should be reported.

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

17 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

Related Questions

Split apk into smaller pieces for Google Play,APK expansion files 3 Answers

File Headers are the Largest, taking up 77% of my build. Why ? And how to reduce It ? 1 Answer

Occlusion Culling in IOS Build? 1 Answer

Why have player file sizes ballooned since 4.2?..and what happened to all the shaders? 1 Answer

After converting the image type from png to jpg, the build size increased. 0 Answers


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