Search Unity

iOS error

Discussion in 'Editor & General Support' started by Rachan, Sep 23, 2021.

  1. Rachan

    Rachan

    Joined:
    Dec 3, 2012
    Posts:
    783
    Hi there!

    I found this on xcode

    thread 40: exc_resource resource_type_memory (limit=700mb

    I have this issue on iPad mini2 with iOS12 and xcode 12 and Unity 2020.2.2f
    it only happen just in some scene!
    so if I remove all props on that scene it can be ok without any problem!
    But if I restore back it still issue I don't know why...

    anyone have any advice?
     
  2. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    38,745
    It smells like you're running out of memory. You can do a bunch of stuff to address this, either conditionally or permanently, and the best place to start is probably by googling some articles / tutorials on it.
     
    Rachan likes this.
  3. Rachan

    Rachan

    Joined:
    Dec 3, 2012
    Posts:
    783
    Thank for your answer
    But actually it can run without any problem at first But after I has modified some sprite shader it has an issue then
    So I restore my project to before upgrade But the error still keep happen I don't know why...
     
  4. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    38,745
    Computers generally run fine until they run out of memory. You're not the only memory consumer.
     
    Rachan likes this.
  5. Rachan

    Rachan

    Joined:
    Dec 3, 2012
    Posts:
    783
    and How to do next? do you have an optimization tips for 2D mobile game?
     
  6. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    38,745
    Definitely start by working through any one of the various tutorials, no sense in me retyping it all here!
     
    Rachan likes this.
  7. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    38,745
    Also, while you can certainly experiment with large textures first, to see what kind of change they make, keep this in mind for ALL optimization, memory, speed, whatever.

    DO NOT OPTIMIZE CODE JUST BECAUSE... If you don't have a problem, DO NOT OPTIMIZE!

    If you DO have a problem, always start by using the profiler:

    Window -> Analysis -> Profiler

    Failure to use the profiler means you're just guessing, making a mess of your code for no good reason.

    https://forum.unity.com/threads/is-...ng-square-roots-in-2021.1111063/#post-7148770

    Notes on optimizing UnityEngine.UI setups:

    https://forum.unity.com/threads/how...form-data-into-an-array.1134520/#post-7289413
     
    Rachan likes this.
  8. Rachan

    Rachan

    Joined:
    Dec 3, 2012
    Posts:
    783
    thank you very much! I will try to looking into it But I still don't know how to use Profiler
     
  9. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    38,745
    Def work through some tutorials. You also want to look at the build report to see the largest assets, which may be a helpful proxy for the things that consume the most RAM, although there is no necessary one-to-one correlation.
     
    Rachan likes this.
  10. Rachan

    Rachan

    Joined:
    Dec 3, 2012
    Posts:
    783
    Thank you very much for your answers But I found the way to make my game can run on my iPad mini2!

    by following this tips in this VDO