Author Topic: i have 2 problems...  (Read 2014 times)

yuvalhaz

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 6
    • View Profile
i have 2 problems...
« on: March 03, 2014, 03:07:15 AM »
problem 1
i put a box collider on a NGUI object for OnMouseDown function and it doesn't effect it when i click on it
problem 2
i'm trying  to link a ngui label and sprite to a 3d scene object to move with it and weird stuff append like the 3d scene disappear
is it possible to link ngui object  to not ngui object?

thank you
yuval

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: i have 2 problems...
« Reply #1 on: March 04, 2014, 12:28:17 AM »
OnMouseDown is a Unity function. NGUI equivalent is:
  1. void OnPress (bool isPressed)
Check the documentation for UICamera. http://www.tasharen.com/forum/index.php?topic=6711.0

To create in-world GUI, do the following:
1. New Game object (ALT+SHIFT+N)
2. Attach UIPanel to it.
3. Scale it to something small, like 0.01.
4. Add widgets to it like you normally would (ALT+SHIFT+S to add a sprite for example).
5. Position this game object where you need it to be in the world.