AnisimovArthur / UnityTools

Editor and Runtime tools for Unity.
MIT License
11 stars 3 forks source link

[Error] NullReferenceException when installed via package manager #1

Closed MostHated closed 4 years ago

MostHated commented 4 years ago

Hey there, I just installed this to try it out via the package manager but received a NullReferenceException right out of the gate.

[Exception] NullReferenceException: Object reference not set to an instance of an object
ToolbarTools.UpdateToolbar() at Library/PackageCache/com.archie.unitytools@2721913c78/Editor/Toolbar/ToolbarTools.cs:101
99:   {
100:       // Get it's visual tree
-->101:       var visualTree = typeof(UnityEditor.Editor).Assembly.GetType("UnityEditor.GUIView").GetProperty("visualTree", BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance)
102:           .GetValue(CurrentToolbar, null) as VisualElement;

ToolbarTools.OnEditorUpdate() at Library/PackageCache/com.archie.unitytools@2721913c78/Editor/Toolbar/ToolbarTools.cs:52
50:       if (CurrentToolbar == null)
51:       {
-->52:           UpdateToolbar();
53:       }
54:   }

EditorApplication.Internal_CallUpdateFunctions() at <d837524d64254fc683935c524089cd1c>:0

I am using 2020.1.0b15. If any other information is needed, do let me know and I can provide it.

Thanks, -MH

AnisimovArthur commented 4 years ago

Hi,

Thank you for the bug report.

I have not tested the package with the new Unity 2020 version yet. I'll dive into it today and will fix it soon.

Thanks, Arthur

AnisimovArthur commented 4 years ago

Hey,

I have just added Unity 2020 compatibility. Thanks for the bug report.

Update to v0.2.2-preview (or newer if available) as described here: https://github.com/AnisimovArthur/UnityTools#update-package

If you will find a new bug or have an idea – feel free to open a new Issue.

MostHated commented 4 years ago

Good deal, I appreciate it. About to test it out now.

MostHated commented 4 years ago

Sorry, got to working and forgot to update. Seems to be working just fine now. Thanks. 👍