Author Topic: Upgrade questions..  (Read 4694 times)

QuantumMechanic

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 7
    • View Profile
Upgrade questions..
« on: October 20, 2016, 08:21:13 PM »
We are in the midst of upgrading from 3.4.8 to 3.10.2 -- Yes, it has been a while.  We have run into a couple of questions.



The signature for UICamera Raycast has changed from:
  1.         static public bool Raycast (Vector3 inPos, out RaycastHit hit)
  2.  
To:
  1.         /// <summary>
  2.         /// Returns the object under the specified position.
  3.         /// </summary>
  4.  
  5.         static public bool Raycast (Vector3 inPos)
  6.  

How do I determine what object the raycast hit?


UIPanel's no longer has a hard clipping option.  What's the correct way to accomplish a hard clip with texture clipping?


Is there a new equivalent to the formerly available UIPanel.onChange?

Seems like there are a lot of nice new features to play with.  Any hidden gotchas for folks who have not upgraded for a while?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Upgrade questions..
« Reply #1 on: October 24, 2016, 06:47:39 AM »
UICamera.lastHit stores it.

What did you use onChange for? In the current dev build of NGUI I actually added UIPanel.onCreateDrawCall because I needed access to the draw call's game object in order to add LOD to it.