Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Heavy memory consumption while using mecanim, Need Help!

Discussion in 'iOS and tvOS' started by SeTHBeaRzz, Sep 24, 2014.

  1. SeTHBeaRzz

    SeTHBeaRzz

    Joined:
    Jan 8, 2014
    Posts:
    35
    http://imgur.com/a/rWJRI

    The first picture illustrates the scene that I used for testing.
    2nd picture illustrates the memory usage when built to an iPad 2 with mecanim.
    3rd picture illustrates the memory usage when built to an iPad 2 without mecanim.
    4th picture illustrates the mecanim that was setup-ed during this test.

    I'm baffled by the results and have no idea how to approach this problem.
    Any help would be greatly appreciated.:(
     
  2. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,625
    Are you using compression on those animations?
     
  3. SeTHBeaRzz

    SeTHBeaRzz

    Joined:
    Jan 8, 2014
    Posts:
    35
    The animations was done using the mecanim, since the models themselves were created by Puppet2D.
    How do I compress such animation?
     
  4. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,625
    If they were created in Unity then I guess you can't compress them.

    Do you own Pro? If yes, what does the profiler say?
     
  5. SeTHBeaRzz

    SeTHBeaRzz

    Joined:
    Jan 8, 2014
    Posts:
    35
    Yes, I do own Pro.
    Specifically which part of the profiler should I be looking out for?
     
  6. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,625
    Memory would be a good start.
     
  7. SeTHBeaRzz

    SeTHBeaRzz

    Joined:
    Jan 8, 2014
    Posts:
    35
  8. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,625
    Well, the profiler shows that no significant ammount of RAM goes to the animations.

    Are you sure the only difference between those two builds is using mecanim?
     
  9. SeTHBeaRzz

    SeTHBeaRzz

    Joined:
    Jan 8, 2014
    Posts:
    35
    further test has shown that it was actually the sprites that were used in the mecanim animations that was causing the large overheads.

    I've resorted to using Unity's Sprite Packer and have gotten some surprising results, on one instance I manage to reduce the memory usage from 580+ mb down to 237+ mb just with sprite packer alone.

    Apparently my animator is not that familiar with the bone animations and has resorted to using sprite combined with bone animation for the results due to tight scheduling.