Author Topic: clipRange.Set() assistance needed  (Read 3594 times)

Malzbier

  • Jr. Member
  • **
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 93
    • View Profile
clipRange.Set() assistance needed
« on: August 06, 2012, 07:13:57 AM »
I like to update the size of the clipping of a UIPanel.
  1. UIPanel thispennel = GetComponent<UIPanel>();
  2. thispennel.clipRange.Set(thispennel.clipRange.x,thispennel.clipRange.y,thispennel.clipRange.z,(thispennel.clipRange.z/ 320) *Screen.currentResolution.height);
  3.  
This does not have any effect.
Is there anyting that have to benn done after setting this?
Ps: This is called in the start routine of a script.

PhilipC

  • Guest
Re: clipRange.Set() assistance needed
« Reply #1 on: August 06, 2012, 10:40:03 AM »
i'm not sure if clipRange.set(...) will call the set property for clipRange (it does a bunch of updates if required in the set). I would say create a new Vector4 and do a clipRange = myVector4

Malzbier

  • Jr. Member
  • **
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 93
    • View Profile
Re: clipRange.Set() assistance needed
« Reply #2 on: August 06, 2012, 12:27:18 PM »
Thanks a lot :) . Works perfectly.
Maybe you should add this to the documentation , so that other NGUI users fill find this easier.