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 ATMEthan · Jun 14, 2013 at 02:59 PM · ioscrashstartupfolder

Large resouce folder iOs crash at startup

Hello Unity Community!

Once again I am in need of some help.

We are working on a project that requires a lot of images (360s of cars and addition layers like paint/trim/lights/wheels). This causes our resource folder to be extremely big, >2.0GB big! In unity editor the app runs fine. Once we try to make an iOS build it crashes at start up. (refer to pictures for crash log/error)

Strangely enough, if we remove some files and get the resource folder to below 2.0GB it will start up and run fine. It's once the resource folder is over 2.0GB when the power occurs.

If you have any questions or want addition information please let me know and I'll response ASAP. I should mention that there is urgency to fix this. We have only til end of day Monday to fix this or we are doomed.

Images about the crash
http://i.imgur.com/yTGlTyB.jpg
http://i.imgur.com/ohvSILj.jpg

EDIT 1: We made a test project that had a ton of images in the resources folder but didn't use/load any of them and got the same problem. So, it seems as if the resources folder has a cap in its size. We are currently looking into using the streaming asset folder. Any suggestions are welcomed.

Comment
Add comment · Show 4
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 Coderdood · Jun 14, 2013 at 04:35 PM 0
Share

Edit: This Answer - While probably helpful to someone is not an answer to this problem.

From this stack exchange post:

iOS apps can be as large as 2 GB, but consider download times when deter$$anonymous$$ing your app’s size. $$anonymous$$inimize the file’s size as much as possible, keeping in $$anonymous$$d that there is a 50 $$anonymous$$B limit for over-the-air downloads.

And from Unity Resource documentation:

In Unity you usually don't use path names to access assets, ins$$anonymous$$d you expose a reference to an asset by declaring a member-variable, and then assign it in the inspector. When using this technique Unity can automatically calculate which assets are used when building a player. This radically $$anonymous$$imizes the size of your players to the assets that you actually use in the built game. When you place assets in "Resources" folders this can not be done, thus all assets in the "Resources" folders will be included in a build.

So if you have 2 GB or more in your Resources folders your game just won't work on iOS. Unfortunately, I'm not sure there is any sort of 'fix' you could do - other than trying to $$anonymous$$imize your file sizes through compression / optimization / etc.

If this is an online type game you might be able to stream assets from the internet but otherwise you are just going to have to cut content.

Welcome to developing for mobile / console-esque devices. Size limits should be considered at all phases of development.

$$anonymous$$ore hints:

  • Unity - Reducing File Size

  • Unity - Optimizing the Size of the Built iOS Player

Good luck!

avatar image ATMEthan · Jun 14, 2013 at 05:08 PM 0
Share

As far as the 2GB application size, this is after it is already on the device. The initial application .ipa is only at ~300$$anonymous$$Bs which is still allowed by Apple.

Furthermore, XCode is crashing when running, not on download to the device.

All of these reasons make me wonder whether it is simply the Resources folder in Unity that is causing this crash.

avatar image Coderdood · Jun 14, 2013 at 05:54 PM 0
Share

Well after further research it does appear like Unity might have had (or still does) a problem with resources folders. I converted my answer to a comment. What version of Unity are you running.

This thread - indicates their problem was fixed by updating to Unity 4.

Also I would send Unity support an email linking here and they should be able to confirm if a some sort of Unity limitation exists - and if so what to do as a workaround / fix.

avatar image ATMEthan · Jun 17, 2013 at 02:17 PM 0
Share

We are using the latest Unity 4 version.

2 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by AntiLunchBox · Jun 14, 2013 at 05:21 PM

If you are using regular image formats, Apple will remake the images to their native image format. However, they do this with no regard to compression so they end up being giant. To avoid this, in Unity make sure the format of your images is PVTRC (you can change this in the inspector when you click on an image, you can probably quickly get all the textures by typing in "texture" into the search bar of the Project tab). That is the native ios image format and it won't remake the images when releasing from XCode.

Comment
Add comment · 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
0

Answer by ATMEthan · Jun 17, 2013 at 02:16 PM

This isn't a true solution for this problem but we realized we had duplicate assets in our folders, so we cleaned up our resources folder and it is now under 2.0GB and it will compile and run now.

Comment
Add comment · 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

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

16 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

Related Questions

iOS Memory Handling Crash on Startup 0 Answers

Getting a crash on iOS Metal devices but not on equivalent iOS non-metal devices. 1 Answer

[UnityAppController renderingAPI] called before [UnityAppController selectRenderingApi] 1 Answer

Weird Crash after Upgrading to 3.5.2 1 Answer

iPad: Line Renderer causes crash on on startup 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