Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Question how do I fix this?

Discussion in 'Editor & General Support' started by RandomManYouDontNeedToKnow, May 4, 2023.

  1. RandomManYouDontNeedToKnow

    RandomManYouDontNeedToKnow

    Joined:
    Mar 24, 2023
    Posts:
    1
    Code (CSharp):
    1. ArgumentNullException: Value cannot be null.
    2. Parameter name: _unity_self
    3. UnityEditor.SerializedObject.FindProperty (System.String propertyPath) (at <dc2d5534f0e54fe8a89aa47a2bf65baf>:0)
    4. UnityEditor.UIElements.Bindings.SerializedObjectBindingContext.BindPropertyRelative (UnityEngine.UIElements.IBindable field, UnityEditor.SerializedProperty parentProperty) (at <78bbcfcd17f4426eab3a0ba57b780c1e>:0)
    5. UnityEditor.UIElements.Bindings.SerializedObjectBindingContext.BindTree (UnityEngine.UIElements.VisualElement element, UnityEditor.SerializedProperty parentProperty) (at <78bbcfcd17f4426eab3a0ba57b780c1e>:0)
    6. UnityEditor.UIElements.Bindings.SerializedObjectBindingContext.ContinueBinding (UnityEngine.UIElements.VisualElement element, UnityEditor.SerializedProperty parentProperty) (at <78bbcfcd17f4426eab3a0ba57b780c1e>:0)
    7. UnityEditor.UIElements.Bindings.DefaultSerializedObjectBindingImplementation+BindingRequest.Bind (UnityEngine.UIElements.VisualElement element) (at <78bbcfcd17f4426eab3a0ba57b780c1e>:0)
    8. UnityEngine.UIElements.VisualTreeBindingsUpdater.Update () (at <2a9c3b3c63ad43cd919ecab17a66cd37>:0)
    9. UnityEngine.UIElements.VisualTreeUpdater.UpdateVisualTreePhase (UnityEngine.UIElements.VisualTreeUpdatePhase phase) (at <2a9c3b3c63ad43cd919ecab17a66cd37>:0)
    10. UnityEngine.UIElements.Panel.UpdateBindings () (at <2a9c3b3c63ad43cd919ecab17a66cd37>:0)
    11. UnityEngine.UIElements.UIElementsUtility.UnityEngine.UIElements.IUIElementsUtility.UpdateSchedulers () (at <2a9c3b3c63ad43cd919ecab17a66cd37>:0)
    12. UnityEngine.UIElements.UIEventRegistration.UpdateSchedulers () (at <2a9c3b3c63ad43cd919ecab17a66cd37>:0)
    13. UnityEditor.RetainedMode.UpdateSchedulers () (at <78bbcfcd17f4426eab3a0ba57b780c1e>:0)
    How in the world do you fix this?
    Seems like it's something to do with me using [SerializeField].
    It also suddenly started to pause the editor because of the error for some reason
     
    gauguerilla likes this.
  2. sandbaydev

    sandbaydev

    Joined:
    Aug 9, 2013
    Posts:
    104
    If you know how, please tell also to me.

    I'm on Unity 2022.2.18
     
  3. sandbaydev

    sandbaydev

    Joined:
    Aug 9, 2013
    Posts:
    104
    Only thing that helps (for some time) is to restart Unity.

    Sometimes I hit the "default layout" in the hopes that it has something to do with this.
     
  4. Oasis-Hurler

    Oasis-Hurler

    Joined:
    Jul 7, 2014
    Posts:
    4
    I'm getting the same issue.
    My error code is:

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

    sandbaydev

    Joined:
    Aug 9, 2013
    Posts:
    104
    I went through every single prefab script and noticed some scripts missing. I deleted them one by one from the prefabs and that MIGHT have helped.

    But since there's no proper way to debug this I have no idea if that really helps anything.

    I only try hit the "window > layouts > default", save, and quit Unity and pray shaman lords that this would work.

    since the "stable" version was causing problems I switched to 2022.2.18 and just hoping it works.

    Sorry for the negativity.... It's just that I've been using Unity for almost 20 years now and 2019 might have been the most stable version so far, but was not supporting mobile apk so had to make a leap forward... and getting pestered by bugs. I'm restarting Unity like 10 times a day.

    This is starting to become such a burden to use :/

    The problem is not "start a new project and give us steps to reproduce". The problem is that Unity does something in the background, some error occurs and there is no way to debug this information. I'm guessing its their renewed prefab system but at least if it would tell "which game object/resource was causing problem with the serialized parentproperty", there would be a way to debug, possibly fix and make better reports.
     
    Last edited: Oct 13, 2023
  6. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    36,711
    It certainly seems that UIToolkit isn't ready for prime time yet.

    Even the official docs say this:

    https://docs.unity3d.com/2020.2/Documentation/Manual/UI-system-compare.html

    "UI Toolkit is in active development. This page will update frequently as the feature set evolves."

    I have to ship games and I cannot be an unpaid QA tester for someone else's software, so UnityEngine.UI is always my current solution until I hear that UIToolkit does 100% of what UGUI does and does it perfectly.
     
    CodeRonnie likes this.
  7. spiney199

    spiney199

    Joined:
    Feb 11, 2021
    Posts:
    5,844
    Thing is most of the Unity Editor's UI in 2020+ is UI elements based now, where these issues are likely happening, and outside of user's control.

    Seems to be more prevalent in 2022 than 2021.
     
    Kurt-Dekker likes this.
  8. ghellee

    ghellee

    Joined:
    Dec 6, 2017
    Posts:
    5
    I have spotted that the problem arrives when I select a GameObject and values are displayed in the Inspector.

    I have to select the GameObject to fine-tune many serialized fields I have assigned to it from the script. This issue makes the development of the game impossible for me...

    Unity 2022.2.21
     
    Da_Elf and gauguerilla like this.
  9. Snedden27

    Snedden27

    Joined:
    Jul 4, 2020
    Posts:
    7
    same issue , using non lts version 2022 version. trying to downgrade to lts to see if that helps
     
  10. gauguerilla

    gauguerilla

    Joined:
    Apr 4, 2023
    Posts:
    2
    I have similar issues then @ghelee reports but with me it's exclusively when highlighting the instance of my scriptableObject to be shown in the inspector before i start the game.

    My workaround is to click on sth else at game start and then click on the ScriptableObject instance after the game started.

    version is: 2022.3.5f1 LTS
     
  11. Da_Elf

    Da_Elf

    Joined:
    Jan 21, 2017
    Posts:
    15
    @ghellee is a life savoir. This was driving me crazy.
     
  12. howler123

    howler123

    Joined:
    May 7, 2017
    Posts:
    17
    I am getting very tired of this particular issue and have submitted a bug, I bet if everyone that has this problem and submits a bug, maybe, just maybe Unity might finally have to resolve this issue and send out an update. I have to close and restart the editor all the time. It really shouldn't matter what my layout is. This should not happen as it is an EDITOR INTERNAL MATTER.
     
  13. IllTemperedTunas

    IllTemperedTunas

    Joined:
    Aug 31, 2012
    Posts:
    608
    In my experience, this happens when an object is selected and the game exits playmode and that object has serialized fields exposed in the inspector. This is especially dangerous for your console window if you have secondary inspector windows open and locked somewhere in your project workspace.

    Solutions that may help:
    Set serialized field things in the inspector to "[HideInInspector]" as it's the reloading of these exposed serialized properties that seems to be throwing out the errors after exiting playmode.

    Set your workspace to default:


    Set the asset you work with all the time to a hotkey (control + alt +1) I believe, and something else (control + alt + 2). When you exit playmode, shift selection between the two assets (control + shift + 2 and 1). I highly recommend adjusting your hotkeys settings so you can select and set with just the # keys and shift as these features are fantastic for fast prototyping once you get used to using them (requires remapping 2d mode and a couple other things)

    If I had to guess i'd say this might all be related to the DOTS and ECS stuff and domain reload, but I'm no C# scientist so I really don't know what's going on. I just know that in a fit of rage at all the error messages I hid literally every variable in every core script and i've been slowly exposing them over time.
     
    detector_tian likes this.
  14. detector_tian

    detector_tian

    Joined:
    Jul 3, 2022
    Posts:
    2
    Same issue on 2022.3.5f1