Search Issue Tracker
Not Reproducible
Votes
0
Found in
5.6.0b8
Issue ID
880680
Regression
Yes
NullReferenceException when using a Scroll View
Steps to reproduce :
- create a new Scrol View
- enter Playmode and notice the errors
NullReferenceException: (null)
UnityEditor.SerializedObject..ctor (UnityEngine.Object[] objs, UnityEngine.Object context) (at /Users/builduser/buildslave/unity/build/artifacts/generated/common/editor/SerializedPropertyBindings.gen.cs:87)
UnityEditor.Editor.GetSerializedObjectInternal () (at /Users/builduser/buildslave/unity/build/artifacts/generated/common/editor/EditorBindings.gen.cs:175)
UnityEditor.Editor.get_serializedObject () (at /Users/builduser/buildslave/unity/build/artifacts/generated/common/editor/EditorBindings.gen.cs:168)
UnityEditor.UI.GraphicEditor.OnEnable () (at /Users/builduser/buildslave/unity/build/Extensions/guisystem/UnityEditor.UI/UI/GraphicEditor.cs:34)
UnityEditor.UI.ImageEditor.OnEnable () (at /Users/builduser/buildslave/unity/build/Extensions/guisystem/UnityEditor.UI/UI/ImageEditor.cs:35)
*Note:
Regression from 5.6b7.
Comments (65)
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Graphics Settings shows default values instead of the real values in the Rendering Debugger when Volume.profile is assigned via script
- Deleting multiple Tags throws “NullReferenceException”, and "Retrieving array element that was out of bounds" errors when holding the Enter key
- Material Component has two horizontal lines under it when its foldouts are closed
- Some selected Mesh Renderer Materials lead to Assets folder when pinged
- Editor colors appear darkened out when HDR Display Output is enabled
thorhammer2301
Mar 16, 2020 07:47
MAKWANAGAMES..was right
go to Edit->Project Settings ->Editor-> Default Behavior Mode. (2D or 3D)
unity 5.6.71f..:)
MaciejKrzykwa
Apr 30, 2018 18:57
I changed "Mask" to "Rect Mask 2D" as MAKWANAGAMES suggested and it helped.
Unity 5.6.4f1
makwanagames
Apr 12, 2018 05:48
This is silly error man... Just go to your Edit->Project Settings -> Default Behavior Mode. (2D or 3D)
If you are in 2D than use "Rect Mask 2D" , If you are in 3D mode than use "Mask".
GiannisMarkou
Dec 23, 2017 07:45
Hey! I had the same problem...I had put a canvas inside a canvas and then tried to scroll some images with the scroll view tool...to solve the error i took the canvas out of the other one! Maybe that can help you.
RocketFriday
Sep 24, 2017 13:59
This happens if you try to set a GameObject with UI elements attached/parented to active or not active from a script. Even if you restart unity you'll still get bugs.
SOLUTION: Use "Using UnityEngine.UI;" and reference the components themselves and use ".enabled = true;" (or false) instead of "SetActive(true);".
I'm assuming Unity assumed people would just do it the proper way and not be lazy and so never anticipated this error.
Hope this helps :P
GameDBharat
Sep 02, 2017 04:15
I got the issue with placing a playing button on the scrollrect. issue will some time appear and goes out.
hawaiian_lasagne
Aug 08, 2017 21:45
+1 Also happening randomly 5.6.1f1
mtalbott
Jul 28, 2017 16:54
Still happening in 5.6.1f2
xtimus
Jul 24, 2017 10:53
5.6.2f
This occurs when a text is added regardless if it is from TextMeshPro or regular Text. Even without the ScrollRect. It is with the Mask component
GreenMartian
Jul 10, 2017 06:33
+1 5.6.2p1