Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: Tranas on February 12, 2013, 07:42:57 PM

Title: Referencing Sprites without using Strings?
Post by: Tranas on February 12, 2013, 07:42:57 PM
First off, NGUI is incredible.
My entire work on this current game project has been with using NGUI and I have to say it's made my life (and job) ridiculously easier.

However, I've run up against a wall here.
And I'm almost 100% certain you can only reference sprites from the atlas by sprite name (String), but why?
Is there a reason that there isn't a more secure method of programatically referencing sprites from the atlas?
I wouldn't imagine using ID Numbers would be far more secure?

Thanks Aren, you rock.
Title: Re: Referencing Sprites without using Strings?
Post by: ArenMook on February 13, 2013, 01:52:09 PM
String names were used for simplicity. It's a lot easier to remember sprite "ABC" than sprite "54263". That said, it's less of an issue now that there is a visual sprite selection dialog.
Title: Re: Referencing Sprites without using Strings?
Post by: Tranas on February 13, 2013, 03:28:00 PM
Very true. I wasn't aware that once upon a time there wasn't a visualization for this sort of thing.
I would suggest adding in sprite IDs for atlas makers so that they could be referenced like that as well for more air-tight programming standards.

Thanks for the speedy reply!!