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
- Visual artifacts appear when the HD Dynamic Resolution Component changes the resolution scale
- Domain Reload loading popup is dark when Editor Theme is set to "Light"
- Scene Views breaks and errors are spammed in the Console when the Game view is shrunk vertically to the minimum, and the Aspect Ratio is 16:9 or 16:10
- Slider Fill Area disappears after undoing “Set Native Size” change
- Crash with multiple stack traces when playing video on a render texture with low-end graphics devices
shubhamswaraj2021
Aug 19, 2020 05:30
good one <a href="https://www.lyricsauto.com">lyricsauto</a>
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
OTTCat
Aug 06, 2017 19:17
+
mtalbott
Jul 28, 2017 16:54
Still happening in 5.6.1f2