Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice
  2. Ever participated in one our Game Jams? Want pointers on your project? Our Evangelists will be available on Friday to give feedback. Come share your games with us!
    Dismiss Notice

iOS Large Memory Usage = Apparently Feature, Not a Bug?

Discussion in 'iOS and tvOS' started by Xander-Davis, Mar 2, 2019.

  1. protopop

    protopop

    Joined:
    May 19, 2009
    Posts:
    1,355
    I'm pretty sure ios 13 only supports 2gb devices, so if you can wait you could restrict your game to ios 13. Thats my backup plan for updates to my existing game - since i could break it using xcode 11 extra memory issue im ghoing to have to restrict updates to ios 13 , that way older players can still download the earlier version thats already on the store if needed, because apple keeps a last compatible version on hand.

    Essentially its not the new iphones that are the equivalent to new console versions, but is the ios software that ersticts things, so you have to work with that in mind. example ios 13 is like a new console bcause it only ensures you are working with 2gb of memory.

    i am also assuming we will se a lot of new graphically intensive games wiith ios 13 from bg companies that have been waiting for that kind of support - there is no way they could release huge games and support older devices because they would crash.
     
    Xander-Davis likes this.
  2. Zimbres

    Zimbres

    Joined:
    Nov 17, 2014
    Posts:
    104
    I sincerely cant believe on this. The memory cap is lower, and the texture uses up to 3x more space than normal? And by July 2019, is it still an issue? Like, really?
    Really?

    I'm testing a game on an IPad6, and I have a crash when the game reaches almost 1gb of video memory use. This is odd, because it does not matters if we change the texture quality on QualitySettings to Eighth Res. The crash happens anyway.
     
  3. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    6,695
    It's not odd, the full res texture is still in memory, it just loads a higher level mip to show, which may have performance improvements.
     
    Zimbres likes this.
  4. Zimbres

    Zimbres

    Joined:
    Nov 17, 2014
    Posts:
    104
    Thanks AcidArrow! This explains a lot. Do you know, by the way, if there's any way of building an app with lower texture sizes?

    (edit)
    I will try that texture platform override thing
     
    Last edited: Jul 16, 2019
  5. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    6,695
    I generally do it manually, I go to each texture and change the desired size.

    I'm guessing it should be doable automatically with an editor script that sets the max resolution of the TextureImporter
     
  6. CoCoNutti

    CoCoNutti

    Joined:
    Nov 30, 2009
    Posts:
    506
    Nope. My 2D game is running terribly on iPad Air to the point of being unplayable.
     
  7. KristoferBoman

    KristoferBoman

    Joined:
    Feb 16, 2016
    Posts:
    58
    Apple removed the memory entitlement in iOS 13. We had to stop supporting 1 GB iOS devices. Right now we show a popup for these users telling them their device is not supported. Eventually we will build the game with iOS 13 as the lowest supported OS version.
     
    Xander-Davis likes this.
  8. ttermeer-reboundcg

    ttermeer-reboundcg

    Joined:
    Jul 12, 2017
    Posts:
    54
    Considering that most developers are forced to switch to iOS 13 to include Apple Sign In before 20 April 2020, it won't be a direct problem. We will have to blame Apple that enforce obsolescence on us.
     
  9. protopop

    protopop

    Joined:
    May 19, 2009
    Posts:
    1,355
    I’m not sure but isn’t that just we need to use iOS 13 sdk? I think that’s available using Xcode 11 and I think we can still release games on earlier versions of iOS. I agree with you though that obsolesence is thrust upon us and I think it’s the hardest part of game design for me to keep up with it.
     
  10. ttermeer-reboundcg

    ttermeer-reboundcg

    Joined:
    Jul 12, 2017
    Posts:
    54
    Well the Apple Sign In only works on device with iOS 13
    I haven't tested it myself yet. I have no idea if you are able to target iOS 11/12 and have that functionality still work in iOS13 devices.
     
    protopop likes this.
  11. protopop

    protopop

    Joined:
    May 19, 2009
    Posts:
    1,355
    I think you’re right that if you want to support Apple sign in then you’d have to target iOS 13 on your build. If you don’t support it I am guessing you could still build for iOS 10 and up (unity’s 2020 minimum iOS version ) as long as you build with the iOS 13 sdk in newer versions of unity.

    Honestly I so barely grasp all this I’m amazed I’ve been able to upload anything :)
     
  12. chaseholton

    chaseholton

    Joined:
    Dec 17, 2012
    Posts:
    71
    I'm glad I'm not alone in this memory mess. I know this is a relatively old thread now, but I've been working hard to optimize my game and I didn't realize it was still using around 1.2 gb of Ram. Basically relegating it to iPhone 8 Plus and above age devices. Not a super wide pool of devices to use.

    I'm going to continue and try to figure out Addressables (lol, wish there was more documentation because every tutorial is solid for a portion of it, but then it's not as useful by the end). But man, I haven't had this much trouble reducing memory in a while.
     
  13. paulc218

    paulc218

    Joined:
    Jul 21, 2019
    Posts:
    3
    Hey guys, I just built my first game from scratch, my first 2 games were to practice so I used a chess and puzzle match template for them, they run fine on mobile because they are small and optimized by someone else who knew what they were doing on this topic. My game came out the way I wanted, look and functionality wise, I am sure I need to optimize a lot of things with graphics and am still learning that. But runs perfectly on windows and mac, so I just built it on my iphone just to see if it would even run, crashed hard. Its a board game so I have an animated scene as the home screen, took up like 600MB of memory and ran fine, but the game is literally all loaded in to one main scene (which I think is ok if I optimized it better), so once I click to the game scene my memory shoots up to 1.77 GB when my iphone crashes (crashed at 1.6GB when I had other stuff open in the background). I think it doesn't need much more than that, possibly 2GB would make it run in its current state.

    I don't really plan on making this an iphone app, screen is too small to be really playable, so ipad is the real goal, but I use an iphone X to test with since I don't own a newer ipad (my ipad is like 7 years old so useless, it can't even upgrade higher than IOS 9 i believe). So can any of you just shed some light on how massive that is? Like I do know it's too big and am working on it, but what's the target amount of max memory that I should be going for? restricting to IOS 13 should be a decent option for me for this game, my plan is to have it on windows by like june so ipad can wait a little longer and its a new app so no existing users/devices to worry about.

    Most threads I am reading about this max memory limit is related to video, which makes sense, and they seem to be able to use over 1GB and from what I am reading here, 2GB seems to be possible on IOS 13? Or do I have a bigger problem and need to do some serious removal/optimization of graphics to ever get this game running on IOS?
     
unityunity