arimger/Unity-Editor-Toolbox

ToolboxEditorToolbar crash on Unity 2020.X+

Team-on opened this issue · 3 comments

Looks like from Unity 2020 UT rename a few classes, so UnityEditor.Toolbar doesn't exist more.
Crash both on 2020.1 and 2020.2 on every recompile

Here are an error:

NullReferenceException: Object reference not set to an instance of an object
Toolbox.Editor.ToolboxEditorToolbar+<Initialize>d__7.MoveNext () (at Library/PackageCache/com.arimger.editor-toolbox@b8f6938225/Editor/ToolboxEditorToolbar.cs:66)
Full stack trace
NullReferenceException: Object reference not set to an instance of an object
Toolbox.Editor.ToolboxEditorToolbar+<Initialize>d__7.MoveNext () (at Library/PackageCache/com.arimger.editor-toolbox@b8f6938225/Editor/ToolboxEditorToolbar.cs:66)
Unity.EditorCoroutines.Editor.EditorCoroutine+YieldProcessor.MoveNext (System.Collections.IEnumerator enumerator) (at Library/PackageCache/com.unity.editorcoroutines@1.0.0/Editor/EditorCoroutine.cs:80)
Unity.EditorCoroutines.Editor.EditorCoroutine.ProcessIEnumeratorRecursive (System.Collections.IEnumerator enumerator) (at Library/PackageCache/com.unity.editorcoroutines@1.0.0/Editor/EditorCoroutine.cs:134)
Unity.EditorCoroutines.Editor.EditorCoroutine.MoveNext () (at Library/PackageCache/com.unity.editorcoroutines@1.0.0/Editor/EditorCoroutine.cs:115)
System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <9577ac7a62ef43179789031239ba8798>: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 <9577ac7a62ef43179789031239ba8798>:0)
System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at <9577ac7a62ef43179789031239ba8798>:0)
System.Delegate.DynamicInvokeImpl (System.Object[] args) (at <9577ac7a62ef43179789031239ba8798>:0)
System.MulticastDelegate.DynamicInvokeImpl (System.Object[] args) (at <9577ac7a62ef43179789031239ba8798>:0)
System.Delegate.DynamicInvoke (System.Object[] args) (at <9577ac7a62ef43179789031239ba8798>:0)
UnityEditor.EditorApplication.Internal_CallUpdateFunctions () (at <1e441e8684a14fe4b8f8a926d91afc3a>:0)

Can you fix that?
Or you can try other custom toolbar package. It have simular basecode, but already implements a few useful toolbars

Thank you for the information and sorry for the trouble. I will fix it ASAP.

Everything should be now ok. In future releases, I will take more care of Toolbar, have few ideas on my TODO list on how to increase the useability of this feature.

Fixed