Search Issue Tracker


Under Consideration for 2022.3.X, 2023.1.X, 2023.2.X



Found in




Issue ID




"ArgumentNullException" error in the Console when selecting certain ScriptableObjects and entering Play Mode



How to reproduce:
1. Open the attached project “SORepro“
2. Select the “SO_MsqData“ asset (Assets>SO)
3. Enter Play Mode

Expected result: No error in the Console
Actual result: “ArgumentNullException: Value cannot be null.“ error in the Console

Reproducible with: 2022.2.16f1, 2022.3.2f1, 2023.1.0b12, 2023.1.0b21, 2023.2.0a9, 2023.2.0a18
Not reproducible with: 2021.3.27f1, 2022.2.15f1, 2023.1.0b11, 2023.2.0a8

Reproduced on: macOS 13.4 (Intel), Windows 10 (by reporter)

Comments (6)

  1. AveSeca

    Sep 10, 2023 18:45

    This bug still happens

  2. mle_ii

    Sep 09, 2023 16:31

    One additional note as a workaround for folks hitting this, so long as we're hitting the same issue.

    If I just make sure that the SO isn't selected in the Inspector, so either make sure nothing is selected by clicking somewhere where an item isn't in the editor or selecting an object of any other type besides the SO, the Exception doesn't occur for me.

  3. mle_ii

    Sep 09, 2023 16:26

    I'm on the latest version and reproducing this or a similar issue.

    Version 2022.3.9f1

    Create a new project 2D Core
    After it's done creating in the Editor right click on Assets and create a new script.
    Open the script in a code editor
    Add the following code to the script

    using UnityEngine;

    [CreateAssetMenu(menuName = "TestSO")]
    public class TestSO : ScriptableObject {
    public Color testColor;

    Save the file
    Go back to the Unity editor and wait for it to finish adding the script
    Right click on Assets and create a new "TestSO" Scriptable object
    Click on Play, keeping that SO selected in the inspector after you created it

    Go to the console and see an ArgumentNullException

    ArgumentNullException: Value cannot be null.
    Parameter name: _unity_self
    UnityEditor.SerializedObject.FindProperty (System.String propertyPath) (at <2e279d988b9d4542841de511fbfdf8c2>:0)
    UnityEditor.UIElements.Bindings.SerializedObjectBindingContext.BindPropertyRelative (UnityEngine.UIElements.IBindable field, UnityEditor.SerializedProperty parentProperty) (at <f1c028bf8ba8480dbbae6f023d0e205d>:0)
    UnityEditor.UIElements.Bindings.SerializedObjectBindingContext.BindTree (UnityEngine.UIElements.VisualElement element, UnityEditor.SerializedProperty parentProperty) (at <f1c028bf8ba8480dbbae6f023d0e205d>:0)
    UnityEditor.UIElements.Bindings.SerializedObjectBindingContext.ContinueBinding (UnityEngine.UIElements.VisualElement element, UnityEditor.SerializedProperty parentProperty) (at <f1c028bf8ba8480dbbae6f023d0e205d>:0)
    UnityEditor.UIElements.Bindings.DefaultSerializedObjectBindingImplementation+BindingRequest.Bind (UnityEngine.UIElements.VisualElement element) (at <f1c028bf8ba8480dbbae6f023d0e205d>:0)
    UnityEngine.UIElements.VisualTreeBindingsUpdater.Update () (at <b8c852c145a8456ba2512bf23f96ab0b>:0)
    UnityEngine.UIElements.VisualTreeUpdater.UpdateVisualTreePhase (UnityEngine.UIElements.VisualTreeUpdatePhase phase) (at <b8c852c145a8456ba2512bf23f96ab0b>:0)
    UnityEngine.UIElements.Panel.UpdateBindings () (at <b8c852c145a8456ba2512bf23f96ab0b>:0)
    UnityEngine.UIElements.UIElementsUtility.UnityEngine.UIElements.IUIElementsUtility.UpdateSchedulers () (at <b8c852c145a8456ba2512bf23f96ab0b>:0)
    UnityEngine.UIElements.UIEventRegistration.UpdateSchedulers () (at <b8c852c145a8456ba2512bf23f96ab0b>:0)
    UnityEditor.RetainedMode.UpdateSchedulers () (at <f1c028bf8ba8480dbbae6f023d0e205d>:0)

    I wasn't able to repro with 3D Core but maybe I just missed something
    I wasn't able to reproduce by just using something like an int in the ScriptableObject, so could be it won't repro with reference type objects, or maybe it's something to do with the visual aspect of the color type in the editor.

  4. samaelxxi

    Aug 19, 2023 17:53

    Same bug when an ScriptableObject is selected in Inspector and Play pressed. 2022.3.7f1

  5. SoftwareGeezers

    Aug 04, 2023 12:18


    I have a controller object with a 'Don't Destroy on Load' and several management scripts, no use of Scriptable Objects. If I have it selected in the inspector and play, I get 16 of these errors. If I select a different object and play, no errors. If while running I select this object, also no errors.

    My guess is as the object moves to DontDestroyOnLoad, the inspector has lot all its pointers for a draw.

  6. howler123

    Jun 10, 2023 14:24

    Until I started adding Scriptable Objects I did not have this error. Unity 2022.3.0

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.