Hello Guest

Author Topic: Sprite.color and texture memory  (Read 5002 times)

2db0t

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 3
    • View Profile
Sprite.color and texture memory
« on: September 18, 2013, 12:48:34 am »
I recall reading that if you modify the colour of a texture in a prefab instance during runtime in Unity, it will create a new copy of that texture in memory.  So for example if you change texture colours on many prefab instances it can become an issue for memory on mobile devices.

Does 2d toolkit use the standard Unity method for this, therefore suffering the same drawbacks?

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Sprite.color and texture memory
« Reply #1 on: September 18, 2013, 11:18:35 am »
No, 2D Toolkit uses vertex colors for tinting sprites and as such doesn't touch the material or textures.

2db0t

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: Sprite.color and texture memory
« Reply #2 on: September 18, 2013, 08:34:05 pm »
Awesome, exactly what I wanted to hear! :)

Thanks for the reply.