Author Topic: Memory Usage  (Read 2234 times)

jeldrez

  • Sr. Member
  • ****
  • Thank You
  • -Given: 8
  • -Receive: 4
  • Posts: 352
    • View Profile
Memory Usage
« on: April 09, 2013, 01:24:08 PM »
The Technical Artist asked me about how NGUI works, because when launching the game in the splash screen (4 logos an 2 more sprites) it is loading 68 textures.
So, it is loading the entire atlas? how I can check what it's loading?


Thanks!



ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Memory Usage
« Reply #1 on: April 09, 2013, 09:40:39 PM »
NGUI does not store any references to source images. If you have 1 atlas, only 1 texture is actually going to be loaded by Unity for NGUI.

Nicki

  • Global Moderator
  • Hero Member
  • *****
  • Thank You
  • -Given: 33
  • -Receive: 141
  • Posts: 1,768
    • View Profile
Re: Memory Usage
« Reply #2 on: April 10, 2013, 03:40:01 AM »
If a given sprite is referenced in the active hierarchy, then the atlases that hold that sprite is loaded. If your 4 logos and 2 other sprites are all in the same atlas, it will only load that single atlas.

If anything else is active in scene you're loading, then those will be loaded too.

I'm not sure where you can actually see what is loaded - maybe the new fancy memory profiler?

jeldrez

  • Sr. Member
  • ****
  • Thank You
  • -Given: 8
  • -Receive: 4
  • Posts: 352
    • View Profile
Re: Memory Usage
« Reply #3 on: April 10, 2013, 10:32:17 AM »
Well, thanks.
The 6 sprites are in the same atlas, so I don't know from where it's getting the other textures. And the atlas just have 10 textures.


I'm using the Profiler to check the textures loaded, but doesn't specify which textures are.


It's weird because there's nothing else in the level.


Thanks anyway.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Memory Usage
« Reply #4 on: April 10, 2013, 03:55:08 PM »
Start a blank scene and publish that, and see if Unity still loads textures.