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 /
This question was closed Nov 14, 2018 at 08:51 AM by AlexVlad for the following reason:

The question is answered, right answer was accepted

avatar image
0
Question by AlexVlad · Nov 13, 2018 at 09:44 AM · ioscrashprojectmemory-leak

Unity app crashes on iOS on startup

Hello Comunity,

I have been developing mobile apps for over a year now. The apps are fairly simple, having only one scene where I move through the menus and instantiate levels etc. I've had no issues until now.

I am working on a slightly more complicated 2d shooter. The number of assets and prefabs has increased considerably. The thing is when the game starts there is nothing loaded in the scene. There is only the main menu active on the canvas and an empty scene in the background. However, the game crashes immediately after the splashscreen. I am sure it is because the project has grown big because on an earlier build, where I had a smaller number of prefabs, the game took a lot to load on iphone 5, but it worked. In the meantime, i've added new character assets, including 2d textures and created new prefabs in the project view and now it crashes immediately.

I checked the code, nothing is different that what i've been doing on other games. The message i get in xcode is this:

OPENGL LOG: Creating OpenGL ES 2.0 graphics device ; Context level ; Context handle 358101232 Initialize engine version: 2018.2.1f1 (1a9968d9f99c) WARNING -> applicationDidReceiveMemoryWarning() Message from debugger: Terminated due to memory issue.

What I don't understand is why is memory being used in excess if nothing is loaded in the scene. Do assets in the Resources folder use up memory although they are not being used actively in the game?

Should I use separate scenes? For the main menu, for each stage etc.?

What can I do to fix this memory crash issue?

Thanks in advance, Alex

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

1 Reply

  • Sort: 
avatar image
0

Answer by AlexVlad · Nov 14, 2018 at 08:51 AM

OK, so yeah, for anyone having the same problem, i figured it out. Shame on me for not thinking of this. If there are references in your script to assets, like public variables assigned in the inspector then yes, they do occupy memory space, even though they are not yet in the scene.

I opted to load them from resources and decided to use multiple scene just to be sure.

Cheers.

Comment
Add comment · Show 1 · 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 florinel2102 · Jul 14, 2020 at 01:48 PM 0
Share

Hi , I'm also having this problem , I test my game on android devices usually (being 2020 , every android has over 3 gb ram) and everyting works fine , but for apple with 1,2 gb ram I get crash on loading big scene , how do you mean by using multiple scene ?

Follow this Question

Answers Answers and Comments

132 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 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

iOS crash problem: Received memory warning . How to solve that? 1 Answer

Unity iOS 13 Memory leak Crash 3 Answers

App Store Rejection - Crashes 2 Answers

Unity 4.2 IOS Exception Handling 0 Answers

iOS game freezes 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