- Home /
The Unity Scrollbar Handle NaN problem
This bug is already discussed in here: http://forum.unity3d.com/threads/vertical-scroll-bar-handle-top-bottom-becomes-nan-with-scroll-view.285490/
and some other posts, but so far there are no workaround.
I will make a brief description of the problem here:
create a scrollbar and link it with a scrollRect
play, it works perfect!
restart unity and open the project
console have "m_transforminfo.worldAABB.isValid()" & "IsFinite(outDistanceForSort()" error
the handle of the scrollbar has posY or posX with "NaN" Value and it disappear in the scene and make the scrollrect not working.
So, anybody have a workaround for this problem???
The only code used in that situation are the 4.6 UI Scrollbar & scrollrect script by Unity :(
Hmm, can you manually set those values in a custom Awake() function, to avoid the error? If so, an ugly workaround would be: create a prefab of the unity scrollbar or scrollrect that does this in awake. From that point on use your pre-fab rather than the unity object.
I have tried to set them to some value but that does not work (as the problem appear when the editor starts, after that, the value cannot be change and fixed to NaN)
I have thought of the prefab solution but haven't tried yet, will try that.
Please vote for the underlying issue, it is still open... :( http://issuetracker.unity3d.com/issues/m-transfor$$anonymous$$fo-dot-localaabb-dot-isvalid-when-reimporting-the-example-project