Author Topic: Depths of UISprites and Textures  (Read 2946 times)

fanling3

  • Newbie
  • *
  • Thank You
  • -Given: 4
  • -Receive: 0
  • Posts: 29
    • View Profile
Depths of UISprites and Textures
« on: October 10, 2014, 12:39:39 AM »
I have 2 large UISprites, one has higher depth than the other. I have a texture, which is downloaded through WWW in realtime.

I want to place the texture in between 2 UISprites (i.e., UISprite1 overlaps the texture, and the texture overlaps UISprite2). Any way to edit the depth of a mesh renderer (if I put the texture in Quad) in between 2 UISprites, or put the texture into UISprite in runtime?

Thanks.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Depths of UISprites and Textures
« Reply #1 on: October 10, 2014, 02:50:38 AM »
Mesh renderers have no depth. Only NGUI components have depth.

Use UITexture to draw your texture. ALT+SHIFT+T.

Note that what you're doing can be done by simply attaching DownloadTexture script to a UITexture.