Author Topic: can't put uibutton over a 2d unity sprites  (Read 5415 times)

pcutile

  • Jr. Member
  • **
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 81
    • View Profile
can't put uibutton over a 2d unity sprites
« on: April 27, 2017, 05:46:29 PM »
can't put a simple button (i need several..) on top of my Unity 2d sprites. why this? i acn't use it to make a simple joystick with button because there are always sprites that are drawed first of the button.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: can't put uibutton over a 2d unity sprites
« Reply #1 on: April 28, 2017, 10:10:52 AM »
You can't mix different UI systems. Stick with one.

NGUI's geometry is drawn using a camera, and Unity's UI is drawn on top of everything else, unless you force it to use a camera as well. Only then can you make it be drawn behind NGUI.

You can draw Unity 2D sprites using NGUI's UI2DSprite component (ALT+SHIFT+D).