SpriteSheet buttons vs UI buttons

Hi everyone
i am testing using ui buttons and spritesheet buttons, and the sprite sheets buttons have less texture use and use less memory of the device, but i really dont know if it happens on all devices and if the performance is the same etc, can everyone give me a little information about the different of this buttons? if spritesheet buttons use less memory on different devices than ui buttons, performance, etc

Thank you [import]uid: 26056 topic_id: 21179 reply_id: 321179[/import]

The benefits of spritesheets are mostly that you can load several images at once, which makes them beneficial for use with animations (as each frame of animation doesn’t need to be loaded separately, but rather as one image and then split up).

When it comes to buttons, I recommend using the widget API. Specifically, widget.newButton(). [import]uid: 52430 topic_id: 21179 reply_id: 83874[/import]

oh, thanks for the quickly answer jonathanbeebe, i am using spritessheet on a spawner object, but i want to use other type of button but UI buttons i think that isnt good, because use more memory than sprites and i can use 3 images on a ui button, only can use 1 or 2, and i want to have, icon1, icon1_pressed,icon2,icon2_pressed… is like i have icon1 and when i press he change to icon1_pressed and when ended he change to icon2, i create it with sprites and cant create with ui buttons, and i am trying to see what is the best way to use buttons on this spawner and on my level chooser buttons, i have 10 levels icons, 1,2,3,4…9,10 and have 8 images per level, and i have 10 levels, will be 80 images on one group, the button is some like it:

my level one have:

  • button one with empty three stars
  • button one with empty three stars_pressed
  • button one with empty two stars and one star caught
  • button one with empty two stars and one star caught, pressed
  • button one with empty one stars and two star caught
  • button one with empty one stars and two star caught, pressed
  • button with three stars caught
  • button with three stars caught, pressed

what i should use for spawner and my levels buttons?
Thanks [import]uid: 26056 topic_id: 21179 reply_id: 83878[/import]

i tested widget buttons vs ui buttons vs simple way to load a image ( local image = …)

the widget buttons use more memory than others buttons, they use:
memory:0.19…
texture usage:0,032…

and ui buttons use:

memory: 0.13…
texture usage:0,032…

and normal buttons use:

memory: 0.13…
texture usage:0,032…

why widget buttons are better?
i will use a lot of buttons on my game i really need to use the less memory as possible with the better performance as possibel, what i should use?

[import]uid: 26056 topic_id: 21179 reply_id: 83971[/import]

up [import]uid: 26056 topic_id: 21179 reply_id: 84096[/import]