Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: Malzbier on August 06, 2012, 07:13:57 AM

Title: clipRange.Set() assistance needed
Post by: Malzbier 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.
Title: Re: clipRange.Set() assistance needed
Post by: PhilipC 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
Title: Re: clipRange.Set() assistance needed
Post by: Malzbier 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.