Search Unity

Error after setDirty

Discussion in 'Editor & General Support' started by Rachan, Apr 17, 2020.

  1. Rachan

    Rachan

    Joined:
    Dec 3, 2012
    Posts:
    782
    Hi there I’m working on editor and I use SetDirty and then I got this error I don’t know why.

    ArgumentNullException: Value cannot be null.
    Parameter name: obj
    UnityEditor.PrefabUtility.GetCorrespondingObjectFromSource[TObject] (TObject componentOrGameObject) (at <78f1ad0f25c84e3ca853e639f50d95f5>:0)
    TerrainTracker.OnPostprocessAllAssets (System.String[] importedAssets, System.String[] deletedAssets, System.String[] movedAssets, System.String[] movedFromAssetPaths) (at Assets/Ferr/2DTerrain/Editor/Ferr2DT_Builder.cs:16)
    System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <437ba245d8404784b9fbab9b439ac908>:0)
    Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
    System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <437ba245d8404784b9fbab9b439ac908>:0)
    System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at <437ba245d8404784b9fbab9b439ac908>:0)
    UnityEditor.AssetPostprocessingInternal.InvokeMethod (System.Reflection.MethodInfo method, System.Object[] args) (at <78f1ad0f25c84e3ca853e639f50d95f5>:0)
    UnityEditor.AssetPostprocessingInternal.PostprocessAllAssets (System.String[] importedAssets, System.String[] addedAssets, System.String[] deletedAssets, System.String[] movedAssets, System.String[] movedFromPathAssets) (at <78f1ad0f25c84e3ca853e639f50d95f5>:0)
    UnityEditor.EditorApplication:Internal_CallUpdateFunctions()