Author Topic: Editor problem with ngui  (Read 3867 times)

Aastha

  • Newbie
  • *
  • Thank You
  • -Given: 2
  • -Receive: 0
  • Posts: 18
    • View Profile
Editor problem with ngui
« on: September 19, 2013, 12:04:12 AM »
Hi,

I am new to unity and using GUI texture for backgrounds and ngui for
widgets. My problem is that widgets do not appear on exact position on
unity editor but when build for xcode simulator or device things are
different and appear on exact position. Can anyone please help me in solving
the problem. I have to build the app again and again for every single
widget created in the app.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Editor problem with ngui
« Reply #1 on: September 19, 2013, 04:17:01 PM »
I don't understand your question, but I suggest looking at the very first example that comes with NGUI -- one that handles anchors. Watching the "catering to different screen sizes" video is also a very useful starting point.

Cawas

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 11
  • fucking programmer
    • View Profile
Re: Editor problem with ngui
« Reply #2 on: September 19, 2013, 04:24:21 PM »
Also, once you're with NGUI, I'd say to avoid using Unity's GUI all together. NGUI can do everything better and if you mix the two you'll only have headaches for yourself. NGUI can work with it, but there's no sense in doing it so.

Aastha

  • Newbie
  • *
  • Thank You
  • -Given: 2
  • -Receive: 0
  • Posts: 18
    • View Profile
Re: Editor problem with ngui
« Reply #3 on: September 20, 2013, 12:23:13 AM »
yes, ngui can work well. But if we are working with full screen images then adding that much bigger images to atlas increases its size to 32 Mb or 64 Mb. So in order to solve this problem i am using gui textures for the fullscreen images.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Editor problem with ngui
« Reply #4 on: September 20, 2013, 03:40:33 AM »
Don't add large images to an atlas. Use UITexture to draw them.

Cawas

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 11
  • fucking programmer
    • View Profile
Re: Editor problem with ngui
« Reply #5 on: September 20, 2013, 04:51:25 AM »
Don't add large images to an atlas. Use UITexture to draw them.
Point and case! :D

Aastha

  • Newbie
  • *
  • Thank You
  • -Given: 2
  • -Receive: 0
  • Posts: 18
    • View Profile
Re: Editor problem with ngui
« Reply #6 on: September 23, 2013, 12:43:26 AM »
Attached is an image i am using in my project as background for popups. If use this image as UITexure the whole area appears as black.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Editor problem with ngui
« Reply #7 on: September 23, 2013, 07:30:26 AM »
There is no reason for that. If the texture gets imported correctly by Unity, it will show up just fine in NGUI.