oddgames / UIToolkit

Single draw call UI solution for Unity with multi resolution support and more.
521 stars 152 forks source link

Multiple Atlases - Zindex / Layer #154

Open ask-partnership opened 10 years ago

ask-partnership commented 10 years ago

Hi. Im using multiple atlases and follow the instructions to add multiple objects each with their own TexturePacker sheets and UIToolkit scripts. All is working fine apart from one thing. If I try to add a background (its own atlas as it's big), it doesnt matter what 'layer' property I set on the script, the background always covers my other UI objects (buttons etc) so I can only see the background. I have tried changing layer, z-index, depth properties on the game object and background sprite to no avail. Can any one guide me on how I can send this sprite to the back?

Thanks Simon

Crushy commented 10 years ago

How are you creating the objects? And what types are you using?

I've never used different atlas for overlapping objects but it should work.

rischkong commented 10 years ago

Use z-Index while generating objects via Script.

And Check also possible nesting of objects in your scene . We have a project with a bigger amount of Atlasses and it runs fine (with some tweeking ;)

Cheers Rischko

+49 172 734 80 84 http://visuelle.de

Am 23.10.2013 um 16:27 schrieb Crushy notifications@github.com:

How are you creating the objects? And what types are you using?

I've never used different atlas for overlapping objects but it should work.

— Reply to this email directly or view it on GitHub.

simon-newman commented 10 years ago

Sorry for late reply, in the end I just created the background as a texture on a plane, due to pressing deadlines. I 'think' I have narrowed down the issue when using the addSprite method. It seems to be ok for UIButton.Create. I will verify this later. Thanks, Si.

unity3diy commented 9 years ago

:+1: