Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Bug ArgumentNullException: Value cannot be null. Parameter name: _unity_self

Discussion in 'Scripting' started by DinoRaids, Jun 21, 2023.

  1. DinoRaids

    DinoRaids

    Joined:
    Jun 18, 2023
    Posts:
    12
    Hi, came across this error while rescaling some game objects. I am not sure whether this has to do with a script I recently added but when the error came, it was long after I implemented the script. The script is not mine, but is a basicFPCC script by AlucardJay. Anyways, the full error is below:
    ArgumentNullException: Value cannot be null.
    Parameter name: _unity_self
    UnityEditor.SerializedObject.FindProperty (System.String propertyPath) (at <582c35e8f45345d395e99f8e72e3c16d>:0)
    UnityEditor.UIElements.Bindings.SerializedObjectBindingContext.BindPropertyRelative (UnityEngine.UIElements.IBindable field, UnityEditor.SerializedProperty parentProperty) (at <af95451922f042e9a8d1a10956fb36a2>:0)
    UnityEditor.UIElements.Bindings.SerializedObjectBindingContext.BindTree (UnityEngine.UIElements.VisualElement element, UnityEditor.SerializedProperty parentProperty) (at <af95451922f042e9a8d1a10956fb36a2>:0)
    UnityEditor.UIElements.Bindings.SerializedObjectBindingContext.ContinueBinding (UnityEngine.UIElements.VisualElement element, UnityEditor.SerializedProperty parentProperty) (at <af95451922f042e9a8d1a10956fb36a2>:0)
    UnityEditor.UIElements.Bindings.DefaultSerializedObjectBindingImplementation+BindingRequest.Bind (UnityEngine.UIElements.VisualElement element) (at <af95451922f042e9a8d1a10956fb36a2>:0)
    UnityEngine.UIElements.VisualTreeBindingsUpdater.Update () (at <d293f45b4ec64e6c9e762fe89794e7a5>:0)
    UnityEngine.UIElements.VisualTreeUpdater.UpdateVisualTreePhase (UnityEngine.UIElements.VisualTreeUpdatePhase phase) (at <d293f45b4ec64e6c9e762fe89794e7a5>:0)
    UnityEngine.UIElements.Panel.UpdateBindings () (at <d293f45b4ec64e6c9e762fe89794e7a5>:0)
    UnityEngine.UIElements.UIElementsUtility.UnityEngine.UIElements.IUIElementsUtility.UpdateSchedulers () (at <d293f45b4ec64e6c9e762fe89794e7a5>:0)
    UnityEngine.UIElements.UIEventRegistration.UpdateSchedulers () (at <d293f45b4ec64e6c9e762fe89794e7a5>:0)
    UnityEditor.RetainedMode.UpdateSchedulers () (at <af95451922f042e9a8d1a10956fb36a2>:0)

    I am just wondering why and when these errors usually come, so if I'm given this, I may be able to find the error on my own, or be able to provide some more information to help find the issue. Please let me know if you need anything and thank you for taking the time to help.

    Much appreciated, Dino.
     
  2. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    38,297
    Starting to see this a lot lately in here. It does not seem related to anything anyone in particular is doing.

    It sounds like Unity still has some kinks in the UIElements package / class.

    Perhaps try reimport all, or reset layouts.
     
  3. DinoRaids

    DinoRaids

    Joined:
    Jun 18, 2023
    Posts:
    12
    Thanks for the suggestion, I'll try this out and let you know if it works out.
     
  4. DinoRaids

    DinoRaids

    Joined:
    Jun 18, 2023
    Posts:
    12
    Great! The error was fixed, thanks for the help!
     
  5. ManieBesselaar

    ManieBesselaar

    Joined:
    Nov 1, 2018
    Posts:
    30
    @Kurt-Dekker Thanks, I can confirm that resetting the layouts worked for me.