Search Unity

  1. We are migrating the Unity Forums to Unity Discussions. On July 12, the Unity Forums will become read-only.

    Please, do not make any changes to your username or email addresses at id.unity.com during this transition time.

    It's still possible to reply to existing private message conversations during the migration, but any new replies you post will be missing after the main migration is complete. We'll do our best to migrate these messages in a follow-up step.

    On July 15, Unity Discussions will become read-only until July 18, when the new design and the migrated forum contents will go live.


    Read our full announcement for more information and let us know if you have any questions.

Question ArgumentNullException: Value cannot be null. Parameter name: dest

Discussion in 'Editor & General Support' started by Bannanaking3, Sep 1, 2022.

  1. Bannanaking3

    Bannanaking3

    Joined:
    Jun 21, 2022
    Posts:
    124
    I don't know what "ArgumentNullException: Value cannot be null. Parameter name: dest" means or how to fix it but my scene won't render. My game still runs fine, how do I fix this?
     
  2. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    39,571
  3. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    Please share the full error message, it should include the filename and the line number where the error occurs.
     
    Zoeleda likes this.
  4. Bannanaking3

    Bannanaking3

    Joined:
    Jun 21, 2022
    Posts:
    124
    ArgumentNullException: Value cannot be null.
    Parameter name: dest
    UnityEditor.EditorUtility.CopySerializedIfDifferent (UnityEngine.Object source, UnityEngine.Object dest) (at /Users/bokken/buildslave/unity/build/Editor/Mono/EditorUtility.cs:149)
    UnityEditorInternal.ComponentUtility.ReplaceComponentsIfDifferent (UnityEngine.GameObject src, UnityEngine.GameObject dst, UnityEditorInternal.ComponentUtility+IsDesiredComponent componentFilter) (at /Users/bokken/buildslave/unity/build/Editor/Mono/ComponentUtility.cs:67)
    UnityEditor.SceneView.UpdateImageEffects (System.Boolean enable) (at /Users/bokken/buildslave/unity/build/Editor/Mono/SceneView/SceneView.cs:2238)
    UnityEditor.SceneView.SetupCamera () (at /Users/bokken/buildslave/unity/build/Editor/Mono/SceneView/SceneView.cs:2920)
    UnityEditor.SceneView.DoOnGUI () (at /Users/bokken/buildslave/unity/build/Editor/Mono/SceneView/SceneView.cs:2304)
    UnityEditor.SceneView.OnSceneGUI () (at /Users/bokken/buildslave/unity/build/Editor/Mono/SceneView/SceneView.cs:2255)
    UnityEngine.UIElements.IMGUIContainer.DoOnGUI (UnityEngine.Event evt, UnityEngine.Matrix4x4 parentTransform, UnityEngine.Rect clippingRect, System.Boolean isComputingLayout, UnityEngine.Rect layoutSize, System.Action onGUIHandler, System.Boolean canAffectFocus) (at /Users/bokken/buildslave/unity/build/ModuleOverrides/com.unity.ui/Core/IMGUIContainer.cs:372)
    UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, UnityEngine.Matrix4x4 worldTransform, UnityEngine.Rect clippingRect, System.Action onGUIHandler, System.Boolean canAffectFocus) (at /Users/bokken/buildslave/unity/build/ModuleOverrides/com.unity.ui/Core/IMGUIContainer.cs:693)
    UnityEngine.UIElements.IMGUIContainer.DoIMGUIRepaint () (at /Users/bokken/buildslave/unity/build/ModuleOverrides/com.unity.ui/Core/IMGUIContainer.cs:553)
    UnityEngine.UIElements.UIR.RenderChainCommand.ExecuteNonDrawMesh (UnityEngine.UIElements.UIR.DrawParams drawParams, System.Single pixelsPerPoint, System.Exception& immediateException) (at /Users/bokken/buildslave/unity/build/ModuleOverrides/com.unity.ui/Core/Renderer/UIRenderer/UIRenderers.cs:129)
    Rethrow as ImmediateModeException
    UnityEngine.UIElements.UIR.RenderChain.Render () (at /Users/bokken/buildslave/unity/build/ModuleOverrides/com.unity.ui/Core/Renderer/UIRRenderChain.cs:518)
    UnityEngine.UIElements.UIRRepaintUpdater.Update () (at /Users/bokken/buildslave/unity/build/ModuleOverrides/com.unity.ui/Core/Renderer/UIRRepaintUpdater.cs:79)
    UnityEngine.UIElements.VisualTreeUpdater.UpdateVisualTreePhase (UnityEngine.UIElements.VisualTreeUpdatePhase phase) (at /Users/bokken/buildslave/unity/build/ModuleOverrides/com.unity.ui/Core/VisualTreeUpdater.cs:155)
    UnityEngine.UIElements.Panel.UpdateForRepaint () (at /Users/bokken/buildslave/unity/build/ModuleOverrides/com.unity.ui/Core/Panel.cs:993)
    UnityEngine.UIElements.Panel.Repaint (UnityEngine.Event e) (at /Users/bokken/buildslave/unity/build/ModuleOverrides/com.unity.ui/Core/Panel.cs:1030)
    UnityEngine.UIElements.UIElementsUtility.DoDispatch (UnityEngine.UIElements.BaseVisualElementPanel panel) (at /Users/bokken/buildslave/unity/build/ModuleOverrides/com.unity.ui/Core/UIElementsUtility.cs:448)
    UnityEngine.UIElements.UIElementsUtility.UnityEngine.UIElements.IUIElementsUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr, System.Boolean& eventHandled) (at /Users/bokken/buildslave/unity/build/ModuleOverrides/com.unity.ui/Core/UIElementsUtility.cs:211)
    UnityEngine.UIElements.UIEventRegistration.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at /Users/bokken/buildslave/unity/build/ModuleOverrides/com.unity.ui/Core/UIElementsUtility.cs:74)
    UnityEngine.UIElements.UIEventRegistration+<>c.<.cctor>b__1_2 (System.Int32 i, System.IntPtr ptr) (at /Users/bokken/buildslave/unity/build/ModuleOverrides/com.unity.ui/Core/UIElementsUtility.cs:28)
    UnityEngine.GUIUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr, System.Boolean& result) (at /Users/bokken/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:189)
     
    Zoeleda likes this.
  5. Miryum

    Miryum

    Joined:
    Jul 25, 2021
    Posts:
    11
    I faced this error today, after reading @Kurt-Dekker's answer, I verfied where I last clicked before the error showed up, I found that a same script was attached twice to the Camera's gameObject.
     
  6. locke12

    locke12

    Joined:
    Aug 5, 2017
    Posts:
    6
    Thanks, live saver.
     
    Rouddem likes this.
  7. mitcore

    mitcore

    Joined:
    May 11, 2021
    Posts:
    4
    you are true life saver!
     
    Rouddem likes this.
  8. YankiAtes

    YankiAtes

    Joined:
    Apr 20, 2021
    Posts:
    1
    thanks it worked
     
  9. NikMikk

    NikMikk

    Joined:
    Nov 4, 2015
    Posts:
    25
  10. greensearch

    greensearch

    Joined:
    Nov 15, 2021
    Posts:
    4
    Here is problem Thanx for advice
     

    Attached Files:

  11. NikMikk

    NikMikk

    Joined:
    Nov 4, 2015
    Posts:
    25
    greensearch likes this.
  12. greensearch

    greensearch

    Joined:
    Nov 15, 2021
    Posts:
    4
  13. Yolk92

    Yolk92

    Joined:
    Mar 11, 2023
    Posts:
    3
    Thanks a lot, this worked
     
  14. redhelwar

    redhelwar

    Joined:
    Feb 16, 2023
    Posts:
    7
    this was it for me, thank you
     
  15. Rouddem

    Rouddem

    Joined:
    Dec 15, 2015
    Posts:
    14
    oh god ! Thank you :)