+2
Fixed

Unity 2018.3.0b1 - Could not load type 'UnityEditor.PreferencesWindow'

RonDMC 3 years ago updated by z3nth10n 3 years ago 5

Hello, I just made a new project and after installing the latest version of Bolt (1.4.0f6) I get the following errors and can not open the Configuration window for Bolt.


TypeLoadException: Could not load type 'UnityEditor.PreferencesWindow'.
System.Reflection.Assembly.GetType (System.String name, Boolean throwOnError, Boolean ignoreCase) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/Assembly.cs:398)
System.Reflection.Assembly.GetType (System.String name, Boolean throwOnError) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/Assembly.cs:381)
Ludiq.ConfigurationPanel..cctor () (at C:/Users/lazlo/Projects/Ludiq/Ludiq.Core/Editor/Windows/ConfigurationPanel/ConfigurationPanel.cs:40)
Rethrow as UnityEditorInternalException: An error occured while accessing internal Unity Editor functions. This might happen if Unity makes backward-incompatible changes in their newer versions of the editor.
Ludiq.ConfigurationPanel..cctor () (at C:/Users/lazlo/Projects/Ludiq/Ludiq.Core/Editor/Windows/ConfigurationPanel/ConfigurationPanel.cs:88)
Rethrow as TypeInitializationException: An exception was thrown by the type initializer for Ludiq.ConfigurationPanel
Ludiq.Product.Initialize () (at C:/Users/lazlo/Projects/Ludiq/Ludiq.Core/Editor/Products/Product.cs:25)
Ludiq.LudiqProduct.Initialize () (at C:/Users/lazlo/Projects/Ludiq/Ludiq.Core/Editor/Product/LudiqProduct.cs:29)
Ludiq.ProductContainer.Initialize () (at C:/Users/lazlo/Projects/Ludiq/Ludiq.Core/Editor/Products/ProductContainer.cs:72)
Rethrow as Exception: Failed to initialize product 'Bolt'.
UnityEngine.Debug:LogException(Exception)
Ludiq.ProductContainer:Initialize() (at C:/Users/lazlo/Projects/Ludiq/Ludiq.Core/Editor/Products/ProductContainer.cs:76)
Ludiq.PluginContainer:Initialize() (at C:/Users/lazlo/Projects/Ludiq/Ludiq.Core/Editor/Plugins/PluginContainer.cs:208)
Ludiq.PluginContainer:.cctor() (at C:/Users/lazlo/Projects/Ludiq/Ludiq.Core/Editor/Plugins/PluginContainer.cs:17)
UnityEditor.EditorAssemblies:ProcessInitializeOnLoadAttributes()


NullReferenceException: Object reference not set to an instance of an object
Bolt.BoltProduct.HookConfiguration () (at C:/Users/lazlo/Projects/Ludiq/Bolt.Core/Editor/BoltProduct.cs:93)


This most likely has to do with me using a beta build of Unity. I'm using 2018.3.0b1

Bolt Version:
Unity Version:
Platform(s):
Scripting Backend:
.NET Version (API Compatibility Level):

I confirm that. Also when I try to open Bolt > Configuration... it does not open config window and throws the following error:

NullReferenceException: Object reference not set to an instance of an object
Bolt.BoltProduct.HookConfiguration () (at C:/Users/lazlo/Projects/Ludiq/Bolt.Core/Editor/BoltProduct.cs:93)


+2
Working on Fix

Hey Ron, hey Dmitry!

Sorry you're having this issue. This is because Unity changed the Preferences Window to an entirely new system in 2018.3. I'll have to investigate how to hook into it from Bolt, but if it's impossible to do that in a cross-version-compatible way, I'll have to provide separate configuration windows, unfortunately.

+1
Fixed in Next Version

So Unity has not yet documented how the new preferences window works anywhere, so I don't know how to hook into it. I'm hotpatching Bolt in v.1.4.0f7 in the mean time so that errors aren't thrown, but you won't be able to automatically jump to the Bolt config from the Tools menu. You'll have to use the Unity Preferences menu item instead, then navigate to Bolt or Ludiq in the tabs.