Search Issue Tracker

Not Reproducible

Votes

0

Found in

5.6.0b8

Issue ID

880680

Regression

Yes

NullReferenceException when using a Scroll View

UI

-

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 (23)

  1. Fd1d1db70300c04ae34054fc6c2b4068?d=mm

    MaciejKrzykwa

    Apr 30, 2018 18:57

    I changed "Mask" to "Rect Mask 2D" as MAKWANAGAMES suggested and it helped.

    Unity 5.6.4f1

  2. C10c793b6279ce7150cd4e7742e1cd57?d=mm

    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".

  3. 73adc49fa5892871e3638c8dc56e7e6c?d=mm

    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.

  4. 6cad0db4c47084e0dd08ee56df2b5141?d=mm

    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

  5. C1a6b82c60e0e641ddd388d97c1153a1?d=mm

    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.

  6. 0676517c8162396fec54fde4f9f50e42?d=mm

    mashcasey

    Aug 08, 2017 21:45

    +1 Also happening randomly 5.6.1f1

  7. 2495ab3d1d1d418667dab63b36be4936?d=mm

    sekisuri

    Aug 06, 2017 19:17

    +

  8. 568672325734d3fb9589add106ccc9d4?d=mm

    mtalbott

    Jul 28, 2017 16:54

    Still happening in 5.6.1f2

  9. B1229a46c19c7815bdb16385845bbc72?d=mm

    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

  10. 45c3076aa877e13ecd41533c32774853?d=mm

    GreenMartian

    Jul 10, 2017 06:33

    +1 5.6.2p1

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.