- Home /
How to add sprites from a sprite sheet to an NGUI atlas
Hi,
I have a sprite sheet with various elements and have used Unity's Sprite Editor to splice them. I would like to be able to add these individual sprites to an NGUI atlas to maintain consistency in the project (use NGUI's UISprite rather than using Unity Sprite Renderer to display these textures, etc.).
I was wondering if there is a way I can do this, possibly using third party software to splice/extract the textures from the sprite sheet.
Has anyone done anything similar?
Thanks in advance.
Answer by Anxo · Oct 06, 2014 at 03:35 PM
You could o/c take it into photoshop and cut it and add it to your atlas but that would be very inconvenient. If you make sure you have the latest version of NGUI, you will be able to use unity sprites in NGUI just not via atlas., Go to your top NGUI menu you select, create, Unity 2D Sprite, this does not behave like a Unity Sprite renderer but more like an NGUI element, allowing you to go pixel perfect and use all the widgets associated with NGUI but with a Unity Sprite. Have not even used the NGUI atlas in a long time because of this feature.
Thanks Anxo, that's working great!
Do you know how this work if say I have a font (characters as sprites) which are also part of the sprite sheet? These have been splice too but is there a way to convert these into a working font.
Thanks
Fonts are different, Aron (the guy who made NGUI) has a video on importing custom fonts to work with NGUI, it works really well but requires the use of a 3rd party free software that arranges and maps the fonts.
Your answer
Follow this Question
Related Questions
Instantiate always at the same position (0,0,0) 1 Answer
Sprite sheet not visualized correctly 0 Answers
NGUI UISpriteAnimation - how to animate a set of sprites with different dimensions 0 Answers
Shader renders sprite as black in game view despite scene view appearing correctly. 0 Answers
What is the most Unity-compatible way to import sprite animations? 1 Answer