InvalidCastException: Cannot cast from source type to destination type (in Unity 2017.4.3f1)

Issue #338 resolved
Reinier Feijen
created an issue

When adding Odin to my 2017.4.3.f1 project, I get the errors below. The errors do not occur in 2017.4.1f1 or earlier versions.

*InvalidCastException: Cannot cast from source type to destination type. Sirenix.OdinInspector.Editor.CustomEditorUtility.ResetCustomEditors () (at D:/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Config/InspectorTypeDrawingConfig.cs:98) Sirenix.OdinInspector.Editor.InspectorConfig.UpdateOdinEditors () (at D:/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Core/Value Entries/PropertyDictionaryElementValueEntry.cs:31) Sirenix.OdinInspector.Editor.CustomEditorLoader+<>c.<.cctor>b__0_0 () (at D:/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Config/InspectorTypeDrawingConfig.cs:76) UnityEditor.EditorApplication.Internal_CallDelayFunctions () (at C:/buildslave/unity/build/Editor/Mono/EditorApplication.cs:136)

InvalidCastException: Cannot cast from source type to destination type. Sirenix.OdinInspector.Editor.CustomEditorUtility.ResetCustomEditors () (at D:/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Config/InspectorTypeDrawingConfig.cs:98) Sirenix.OdinInspector.Editor.InspectorConfig.UpdateOdinEditors () (at D:/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Core/Value Entries/PropertyDictionaryElementValueEntry.cs:31) Sirenix.OdinInspector.Editor.InspectorConfig.<UnityEngine.ISerializationCallbackReceiver.OnAfterDeserialize>b18_0 () (at D:/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Core/Value Entries/PropertyDictionaryElementValueEntry.cs:60) Sirenix.OdinInspector.Editor.UnityEditorEventUtility+<>cDisplayClass5_0.<DelayAction>b4 () (at D:/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/OdinEditorWindow/OdinMenuEditorWindow.cs:135) Sirenix.OdinInspector.Editor.UnityEditorEventUtility+<>cDisplayClass5_0.<DelayAction>b0 (System.String _, Rect ) (at D:/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/OdinEditorWindow/OdinMenuEditorWindow.cs:102) UnityEditor.ProjectBrowser.OnGUIAssetCallback (Int32 instanceID, Rect rect) (at C:/buildslave/unity/build/Editor/Mono/ProjectBrowser.cs:613) UnityEditor.IMGUI.Controls.TreeViewController.DoItemGUI (UnityEditor.IMGUI.Controls.TreeViewItem item, Int32 row, Single rowWidth, Boolean hasFocus) (at C:/buildslave/unity/build/Editor/Mono/GUI/TreeView/TreeViewController.cs:469) UnityEditor.IMGUI.Controls.TreeViewController.IterateVisibleItems (Int32 firstRow, Int32 numVisibleRows, Single rowWidth, Boolean hasFocus) (at C:/buildslave/unity/build/Editor/Mono/GUI/TreeView/TreeViewController.cs:620) UnityEditor.IMGUI.Controls.TreeViewController.OnGUI (Rect rect, Int32 keyboardControlID) (at C:/buildslave/unity/build/Editor/Mono/GUI/TreeView/TreeViewController.cs:551) UnityEditor.ProjectBrowser.OnGUI () (at C:/buildslave/unity/build/Editor/Mono/ProjectBrowser.cs:1746) 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) Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation. 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) System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MethodBase.cs:115) UnityEditor.HostView.Invoke (System.String methodName, System.Object obj) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:295) UnityEditor.HostView.Invoke (System.String methodName) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:288) UnityEditor.HostView.InvokeOnGUI (Rect onGUIPosition) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:255) UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

GUI Error: You are pushing more GUIClips than you are popping. Make sure they are balanced) UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)*

Comments (2)

  1. Log in to comment