121
NGUI 3 Support / ScrollView + UISlider problem
« on: March 12, 2014, 01:52:20 PM »
Hi,
I updated NGUI on monday to the last version 3.5.3 but I have a problem I hadn't before.
I have an unrestricted UIScrollview that is linked to an UISlider.
Every time I scroll the panel by touch or click I got this error:
I attached the configuration of the UIScrollView and UISlider to the topic.
Thank you.
EDIT: I did more tests and I debugged the variable 'sb' of the line throwing NullRefException
returns:
But when I debug it before the function call, it's not null...
EDIT2:
Little more test
returns null. You're casting the UIProgressBar to UIScrollBar but it's breaking it... Can I remove the cast without breaking all NGUI?
I updated NGUI on monday to the last version 3.5.3 but I have a problem I hadn't before.
I have an unrestricted UIScrollview that is linked to an UISlider.
Every time I scroll the panel by touch or click I got this error:
Quote
NullReferenceException: Object reference not set to an instance of an objectIf I don't touch the ScrollView but I slide the UISlider, it does nothing.
UIScrollView.UpdateScrollbars (.UIScrollBar sb, Single contentMin, Single contentMax, Single contentSize, Single viewSize, Boolean inverted) (at Assets/NGUI/Scripts/Interaction/UIScrollView.cs:494)
UIScrollView.UpdateScrollbars (Boolean recalculateBounds) (at Assets/NGUI/Scripts/Interaction/UIScrollView.cs:441)
UIScrollView.MoveRelative (Vector3 relative) (at Assets/NGUI/Scripts/Interaction/UIScrollView.cs:632)
UIScrollView.MoveAbsolute (Vector3 absolute) (at Assets/NGUI/Scripts/Interaction/UIScrollView.cs:643)
UIScrollView.LateUpdate () (at Assets/NGUI/Scripts/Interaction/UIScrollView.cs:874)
I attached the configuration of the UIScrollView and UISlider to the topic.
Thank you.
EDIT: I did more tests and I debugged the variable 'sb' of the line throwing NullRefException
- Debug.Log ("HorizontalScrollBar:"+sb);
Quote
HorizontalScrollBar:So the UIScrollbar seems to be NULL.
But when I debug it before the function call, it's not null...
EDIT2:
Little more test
- Debug.Log ("ScrollBar:"+ (horizontalScrollBar as UIScrollBar));