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

GetCorrespondingObjectFromSource error but no mention in solution

Discussion in 'Editor & General Support' started by malkere, Mar 24, 2019.

  1. malkere

    malkere

    Joined:
    Dec 6, 2013
    Posts:
    1,209
    I'm getting a

    Code (CSharp):
    1.     MissingMethodException: Method not found: 'UnityEditor.PrefabUtility.GetCorrespondingObjectFromSource'.
    error, but a solution wide search doesn't produce anything calling GetCorrespondingObjectFromSource so I can't figure out how to track it down? This is 2018.3.9f1 and it happens in a blank scene soon as soon as I hit play. I just upgraded from 2018.2 but can't figure out how to find the problem.

    The full error is:

    Code (CSharp):
    1. MissingMethodException: Method not found: 'UnityEditor.PrefabUtility.GetCorrespondingObjectFromSource'.
    2. System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:222)
    3. Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
    4. System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:232)
    5. System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MethodBase.cs:115)
    6. UnityEditor.Build.BuildPipelineInterfaces+AttributeCallbackWrapper.OnProcessScene (Scene scene, UnityEditor.Build.Reporting.BuildReport report) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildPipelineInterfaces.cs:163)
    7. UnityEditor.Build.BuildPipelineInterfaces+<OnSceneProcess>c__AnonStorey1.<>m__1 (IProcessSceneWithReport spp) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildPipelineInterfaces.cs:387)
    8. UnityEditor.Build.BuildPipelineInterfaces.InvokeCallbackInterfacesPair[IProcessScene,IProcessSceneWithReport] (System.Collections.Generic.List`1 oneInterfaces, System.Action`1 invocationOne, System.Collections.Generic.List`1 twoInterfaces, System.Action`1 invocationTwo, Boolean exitOnFailure) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildPipelineInterfaces.cs:356)
    9. UnityEditor.Build.BuildPipelineInterfaces:OnSceneProcess(Scene, BuildReport)
    10.  
     
    Last edited: Mar 24, 2019
  2. malkere

    malkere

    Joined:
    Dec 6, 2013
    Posts:
    1,209
    it was in a dll i was able to update which fixed the error
     
  3. Shinyclef

    Shinyclef

    Joined:
    Nov 20, 2013
    Posts:
    478
    I have the exact same issue. Can you share which DLL was the issue and how you replaced it?
     
  4. malkere

    malkere

    Joined:
    Dec 6, 2013
    Posts:
    1,209
    I use Mirror which until recently was packaged in a dll. After upgrading it to the latest which is now individual cs files, I was able to see the issue and correct it. If a solution wide search in visual studio doesn't give you any results I'd suggest you do a search for any dlls in your project, figure out who they belong to, and try to update them.
     
  5. manirana94

    manirana94

    Joined:
    Apr 16, 2018
    Posts:
    7
    • Changed reference to PrefabUtility.GetPrefabParent() to PrefabUtility.GetCorrespondingObjectFromSource() to reflect public API change in 2018.2
    Unity provides automatic API update for upgrading but not downgrading.

    Change GetCorrespondingObjectFromSource to GetPrefabParent by yourself.