0
Cannot Reproduce

Missing method PrefabUtility.GetCorrespondingObjectFromSource in Unity 2018.3.0f2

Zyrathius 2 years ago updated by Simon Smith 2 years ago 16

Getting this now after updating to 2018.3.  I tried rebuilding units and regenerating assemblies etc....

MissingMethodException: Method not found: 'UnityEditor.PrefabUtility.GetCorrespondingObjectFromSource'.
Ludiq.EditorUnityObjectUtility.IsPrefabInstance (UnityEngine.Object uo) (at C:/Users/lazlo/Projects/Bolt1/Package/Ludiq.Core/Editor/ResourceProviders/AssemblyResourceProvider.cs:301)
Ludiq.EditorUnityObjectUtility.IsConnectedPrefabInstance (UnityEngine.Object uo)
Ludiq.Metadata.MatchWithPrefab () (at C:/Users/lazlo/Projects/Bolt1/Package/Ludiq.Core/Editor/Dependencies/ReorderableList/ReorderableListGUI.cs:255)
Ludiq.ObjectMetadata..ctor (System.Object object, System.Type definedType, Ludiq.Metadata parent)
Ludiq.Metadata+DigStaticObject.<.ctor>b__0_0 (Ludiq.Metadata parent) (at C:/Users/lazlo/Projects/Bolt1/Package/Ludiq.Core/Editor/Dependencies/ReorderableList/Element Adder Menu/ElementAdderMenuBuilder.cs:108)
Ludiq.Metadata.Dig[Object,ObjectMetadata] (System.Object subpath, System.Func`2 constructor, Boolean createInPrefab, Ludiq.Metadata prefabInstance) (at C:/Users/lazlo/Projects/Bolt1/Package/Ludiq.Core/Editor/Dependencies/ReorderableList/ReorderableListGUI.cs:83)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

Bolt Version:
1.4.0f11
Unity Version:
2018.3.0f2
Platform(s):
Scripting Backend:
.NET Version (API Compatibility Level):

Odd, I thought I had fixed that issue as soon as 2018.3 came into beta. I'll give it another look, maybe the method signature changed in the final version.

Fixed

Hi Zyrathius,

Looking at this bug report again, I think you may be on an older Bolt version than you reported.

This issue was fixed in Bolt v.1.4.0f10. The stack trace you posted matches code that is no longer in recent Bolt versions.

You can check you Bolt version in Tools > Bolt > About:

Can you try updating to v.1.4.0f11 and see if that fixes the issue?

Hmm...I'm using the latest Unity (2018.3.0f2) and the latest Bolt (v.1.4.0f11) and I'm seeing the same thing. This is my first try at using Bolt, so it's quite possible I did something wrong during installation...

Or, since you say that code that was posted is from an older version of Bolt, is it possible I installed Bolt after I originally bought it and there's a piece of it in my system that didn't get updated today when I imported it into a new project? 

Jay

+1

hmmm...never mind. I uninstalled the asset and reimported and it seems to work now. 

Kind of sucks that nobody from Ludiq ever responded to me, though. 

Sorry, been out for the Holidays.  I got back today and I double checked my about box and it listed v.1.4.0f11 on the main about screen.   I will try to uninstall and reinstall it and see if that helps.  Thank you.

The uninstall/reinstall seems to have fixed it.  No version numbers changed, however it no longer gives me any errors.  I guess there was a file that had not properly updated or something.  

They are normally pretty responsive Jay, they have probably been out on Holiday.

Hi Jay, Zyrathius! It's possible that if you unchecked items during an import of an updated version, you might not have gotten the fix, but by default, it should have been included. Regardless, I'm glad it's working for you now. Sorry for the late reply, I was on a 2 weeks holiday break indeed.

Trying to use Bolt for the first time and I'm getting this same error when I try to create a Flow Machine. Unity version 2018.3.1f1. Ludiq Core and Bolt Flow are on 1.4.0f11, Ludiq Graphs, Bolt Core, and Bolt State are on 1.4.0f10. Uninstalling/reinstalling as well as reimporting haven't fixed things. Any ideas?

Hi Simon! That's odd, this should have been fixed in v.1.4.0f10. Can you paste the full stack trace of the error?

In the mean time, you can try to reimport and say yes to the prompt when importing Bolt about updating the project:

Stack trace is here:

MissingMethodException: UnityEngine.Object UnityEditor.PrefabUtility.GetCorrespondingObjectFromSource(UnityEngine.Object)

Ludiq.EditorUnityObjectUtility.IsPrefabInstance (UnityEngine.Object uo) (at C:/Users/lazlo/Projects/Bolt1/Package/Ludiq.Core/Editor/ResourceProviders/AssemblyResourceProvider.cs:301)

Ludiq.EditorUnityObjectUtility.IsConnectedPrefabInstance (UnityEngine.Object uo) (at :0)

Ludiq.Metadata.MatchWithPrefab () (at C:/Users/lazlo/Projects/Bolt1/Package/Ludiq.Core/Editor/Dependencies/ReorderableList/ReorderableListGUI.cs:255)

Ludiq.ObjectMetadata..ctor (System.Object object, System.Type definedType, Ludiq.Metadata parent) (at :0)

Ludiq.Metadata+DigStaticObject.<.ctor>b__0_0 (Ludiq.Metadata parent) (at C:/Users/lazlo/Projects/Bolt1/Package/Ludiq.Core/Editor/Dependencies/ReorderableList/Element Adder Menu/ElementAdderMenuBuilder.cs:108)

Ludiq.Metadata.Dig[TSubpath,TMetadata] (TSubpath subpath, System.Func`2[T,TResult] constructor, System.Boolean createInPrefab, Ludiq.Metadata prefabInstance) (at C:/Users/lazlo/Projects/Bolt1/Package/Ludiq.Core/Editor/Dependencies/ReorderableList/ReorderableListGUI.cs:83)

Ludiq.Metadata.StaticObject (System.Object object, System.Type definedType) (at C:/Users/lazlo/Projects/Bolt1/Package/Ludiq.Core/Editor/Dependencies/ReorderableList/ReorderableListStyles.cs:106)

Ludiq.Metadata.StaticObject (System.Object object) (at C:/Users/lazlo/Projects/Bolt1/Package/Ludiq.Core/Editor/Dependencies/ReorderableList/ReorderableListStyles.cs:111)

Ludiq.LudiqRootObjectEditor+Individual.Initialize () (at C:/Users/lazlo/Projects/Bolt1/Package/Ludiq.Core/Editor/Plugins/PluginContainer.cs:338)

Ludiq.IndividualEditor.Initialize (UnityEditor.SerializedObject serializedObject, UnityEditor.Editor editorParent) (at C:/Users/lazlo/Projects/Bolt1/Package/Ludiq.Core/Editor/Meta/Metadata.cs:223)

Ludiq.OptimizedEditor`1[TIndividual].GetIndividualDrawer (UnityEditor.SerializedObject serializedObject) (at C:/Users/lazlo/Projects/Bolt1/Package/Ludiq.Core/Editor/Plugins/PluginResources.cs:119)

Ludiq.OptimizedEditor`1[TIndividual].OnInspectorGUI () (at C:/Users/lazlo/Projects/Bolt1/Package/Ludiq.Core/Editor/Plugins/PluginResources.cs:124)

UnityEditor.InspectorWindow.DoOnInspectorGUI (System.Boolean rebuildOptimizedGUIBlock, UnityEditor.Editor editor, System.Boolean wasVisible, UnityEngine.Rect& contentRect) (at C:/buildslave/unity/build/Editor/Mono/Inspector/InspectorWindow.cs:1625)

UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

Reimporting doesn't prompt me to update any APIs, maybe that's the problem? The 'Run API Importer' in the Assets menu is also greyed out.

I'm getting this error when adding Bolt to a project for the first time. Seems to be something going wrong with Unity's API Updater. Might be the issue.

System.InvalidOperationException: Operation is not valid due to the current state of the object.
at Mono.Cecil.ModuleDefinition.ReadSymbols (Mono.Cecil.Cil.ISymbolReader reader) [0x0002f] in :0
at Mono.Cecil.ModuleReader.ReadSymbols (Mono.Cecil.ModuleDefinition module, Mono.Cecil.ReaderParameters parameters) [0x0004a] in :0
at Mono.Cecil.ModuleReader.CreateModule (Mono.Cecil.PE.Image image, Mono.Cecil.ReaderParameters parameters) [0x00081] in :0
at Mono.Cecil.ModuleDefinition.ReadModule (Mono.Disposable`1[T] stream, System.String fileName, Mono.Cecil.ReaderParameters parameters) [0x0000d] in :0
at Mono.Cecil.ModuleDefinition.ReadModule (System.String fileName, Mono.Cecil.ReaderParameters parameters) [0x0006c] in :0
at Mono.Cecil.AssemblyDefinition.ReadAssembly (System.String fileName, Mono.Cecil.ReaderParameters parameters) [0x00000] in :0
at AssemblyUpdater.Core.AssemblyUpdaterContext.ReadAssembly (System.String assemblyPath, APIUpdater.Framework.Log.IAPIUpdaterListener listener, System.IO.FileAccess mode, System.String nugetPath, System.String[] searchPaths) [0x00072] in :0
at AssemblyUpdater.Core.AssemblyUpdaterContext.From (System.String assemblyPath, APIUpdater.Framework.Configuration.IConfigurationProvider configuration, System.String[] assemblySearchPaths, System.String nugetPath, AssemblyUpdater.Core.UpdaterMode mode, APIUpdater.Framework.Log.IAPIUpdaterListener listener) [0x0002c] in :0
at AssemblyUpdater.Core.AssemblyUpdaterContext.From (System.String assemblyPath, System.String[] assemblySearchPaths, System.String nugetPath, AssemblyUpdater.Core.UpdaterMode mode, APIUpdater.Framework.Log.IAPIUpdaterListener listener) [0x00001] in :0
at AssemblyUpdater.Application.Program.CheckForObsoleteAPIUsage (AssemblyUpdater.Application.CommandLineSpec config, APIUpdater.Framework.Log.ConsoleUpdateListener logger) [0x00013] in :0
at AssemblyUpdater.Application.Program.Main (System.String[] args) [0x00057] in :0
UnityEditor.Scripting.APIUpdaterAssemblyHelper:DoesAssemblyRequireUpgrade(String)
UnityEditorInternal.InternalEditorUtility:ProjectWindowDrag()
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

Pending Review

That's very odd, I just looked at the source and the error you're getting should at least have been rethrown as UnityEditorInternalException, which isn't happening from your stack trace.

I'll try installing 2018.3.1f1 and see if anything changed in this version.

Cannot Reproduce

Hi Simon,

Just tried in Unity 2018.3.1f1 and I'm not getting the issue. If you had previous Bolt version installed, you can try as the others in this thread to delete it entirely then re-install, it seems to have fixed the issue for them. Alternatively, you can try downloading one of the later betas of v.1.4.1 on our Download page, and see if you have more luck with the new versions.

Switching to beta 1.4.1b5 fixed things. Thanks!