Known issues

From Unify Community Wiki
Jump to: navigation, search

Here is a list of known issues with Unity 3D 2.6


GUI.BeginScrollView

There is a bug in...

Vector2 GUI.BeginScrollView(Rect position, Vector2 scrollPosition, Rect viewRect, bool alwaysShowHorizontal, bool alwaysShowVertical, GUIStyle horizontalScrollbar, GUIStyle verticalScrollbar)

...which calls...

return BeginScrollView(position, scrollPosition, viewRect, alwaysShowHorizontal, alwaysShowVertical, horizontalScrollbar, verticalScrollbar, null);

...with the last argument being null. This throws a null exception since the background style must not be null. In fact, the function where the error occurs has a bad guard if (... && (background != GUIStyle.none)) - note that the code doesn't check for null. There exists another overload which doesn't allow scrollbars to always show which works, in case you need to specify custom GUIStyles. I believe the correct behaviour would be to either use a default skin (and not null), or even better - expose the end overloaded function so it is no longer internal.

Personal tools
Namespaces

Variants
Actions
Navigation
Extras
Toolbox