jacobdufault / fullinspector

Full Inspector supercharges Unity's inspector
MIT License
111 stars 27 forks source link

Dictionary, Property (Unity 5.5) - InvalidCastException: Cannot cast from source type to destination type #196

Open coduar opened 7 years ago

coduar commented 7 years ago

In Unity 5.5, I'm getting this error constantly even when the dictionary is empty: InvalidCastException: Cannot cast from source type to destination type. FullInspector.Internal.fiISerializedObjectUtility+cAnonStorey0`1[FullInspector.FullSerializerSerializer].<>m0 () (at Assets/FullInspector2/Core/fiISerializedObjectUtility.cs:117) FullInspector.Internal.fiLateBindingsBinder+cAnonStorey0.<>m0 () (at Assets/FullInspector2/Core/Editor/fiLateBindingsBinder.cs:24) UnityEditor.EditorApplication.Internal_CallUpdateFunctions () (at C:/buildslave/unity/build/artifacts/generated/common/editor/EditorApplicationBindings.gen.cs:197)

bilibiliChangKai commented 5 years ago

I meet with the same error! The error message as follow

InvalidCastException: Cannot cast from source type to destination type. FullInspector.fiValue`1[T].FullInspector.Internal.fiIValueProxyAPI.set_Value (System.Object value) FullInspector.fiValuePropertyDrawer.OnGUI (Rect position, UnityEditor.SerializedProperty property, UnityEngine.GUIContent label) UnityEditor.PropertyDrawer.OnGUISafe (Rect position, UnityEditor.SerializedProperty property, UnityEngine.GUIContent label) (at V:/unity/2017.1.p5/Editor/Mono/ScriptAttributeGUI/PropertyDrawer.cs:22) UnityEditor.PropertyHandler.OnGUI (Rect position, UnityEditor.SerializedProperty property, UnityEngine.GUIContent label, Boolean includeChildren) (at V:/unity/2017.1.p5/Editor/Mono/ScriptAttributeGUI/PropertyHandler.cs:142) UnityEditor.PropertyHandler.OnGUILayout (UnityEditor.SerializedProperty property, UnityEngine.GUIContent label, Boolean includeChildren, UnityEngine.GUILayoutOption[] options) (at V:/unity/2017.1.p5/Editor/Mono/ScriptAttributeGUI/PropertyHandler.cs:203) UnityEditor.EditorGUILayout.PropertyField (UnityEditor.SerializedProperty property, UnityEngine.GUIContent label, Boolean includeChildren, UnityEngine.GUILayoutOption[] options) (at V:/unity/2017.1.p5/Editor/Mono/EditorGUI.cs:7719) UnityEditor.EditorGUILayout.PropertyField (UnityEditor.SerializedProperty property, Boolean includeChildren, UnityEngine.GUILayoutOption[] options) (at V:/unity/2017.1.p5/Editor/Mono/EditorGUI.cs:7713) UnityEditor.Editor.DrawPropertiesExcluding (UnityEditor.SerializedObject obj, System.String[] propertyToExclude) (at V:/unity/2017.1.p5/artifacts/generated/common/editor/EditorBindings.gen.cs:295) MoleMole.MonoEffectPluginEditor.OnInspectorGUI () (at Assets/MoleMole/Toolkits/Editor/CustomEditors/MonoEffectPluginEditor.cs:24) UnityEditor.InspectorWindow.DrawEditor (UnityEditor.Editor[] editors, Int32 editorIndex, Boolean rebuildOptimizedGUIBlock, System.Boolean& showImportedObjectBarNext, UnityEngine.Rect& importedObjectBarRect) (at V:/unity/2017.1.p5/Editor/Mono/Inspector/InspectorWindow.cs:1250) UnityEngine.DebugLogHandler:Internal_LogException(Exception, Object) UnityEngine.DebugLogHandler:LogException(Exception, Object) UnityEngine.Logger:LogException(Exception, Object) UnityEngine.Debug:LogException(Exception) UnityEditor.InspectorWindow:DrawEditor(Editor[], Int32, Boolean, Boolean&, Rect&) (at V:/unity/2017.1.p5/Editor/Mono/Inspector/InspectorWindow.cs:1257) UnityEditor.InspectorWindow:DrawEditors(Editor[]) (at V:/unity/2017.1.p5/Editor/Mono/Inspector/InspectorWindow.cs:1031) UnityEditor.InspectorWindow:OnGUI() (at V:/unity/2017.1.p5/Editor/Mono/Inspector/InspectorWindow.cs:365) System.Reflection.MonoMethod:InternalInvoke(Object, Object[], Exception&) System.Reflection.MonoMethod:Invoke(Object, BindingFlags, Binder, Object[], CultureInfo) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:222) System.Reflection.MethodBase:Invoke(Object, Object[]) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MethodBase.cs:115) UnityEditor.HostView:Invoke(String, Object) (at V:/unity/2017.1.p5/Editor/Mono/HostView.cs:272) UnityEditor.HostView:Invoke(String) (at V:/unity/2017.1.p5/Editor/Mono/HostView.cs:265) UnityEditor.HostView:InvokeOnGUI(Rect) (at V:/unity/2017.1.p5/Editor/Mono/HostView.cs:232) UnityEditor.DockArea:OldOnGUI() (at V:/unity/2017.1.p5/Editor/Mono/GUI/DockArea.cs:407) UnityEngine.Experimental.UIElements.IMGUIContainer:DoOnGUI(Event) (at V:/unity/2017.1.p5/Runtime/UIElements/Managed/IMGUIContainer.cs:115) UnityEngine.Experimental.UIElements.IMGUIContainer:HandleEvent(Event, VisualElement) (at V:/unity/2017.1.p5/Runtime/UIElements/Managed/IMGUIContainer.cs:188) UnityEngine.Experimental.UIElements.IMGUIContainer:DoRepaint(IStylePainter) (at V:/unity/2017.1.p5/Runtime/UIElements/Managed/IMGUIContainer.cs:38) UnityEngine.Experimental.UIElements.Panel:PaintSubTree(Event, VisualElement, Matrix4x4, Rect) (at V:/unity/2017.1.p5/Runtime/UIElements/Managed/Panel.cs:425) UnityEngine.Experimental.UIElements.Panel:PaintSubTree(Event, VisualElement, Matrix4x4, Rect) (at V:/unity/2017.1.p5/Runtime/UIElements/Managed/Panel.cs:435) UnityEngine.Experimental.UIElements.Panel:Repaint(Event) (at V:/unity/2017.1.p5/Runtime/UIElements/Managed/Panel.cs:450) UnityEngine.Experimental.UIElements.UIElementsUtility:DoDispatch(BaseVisualElementPanel) (at V:/unity/2017.1.p5/Runtime/UIElements/Managed/UIElementsUtility.cs:178) UnityEngine.Experimental.UIElements.UIElementsUtility:ProcessEvent(Int32, IntPtr) (at V:/unity/2017.1.p5/Runtime/UIElements/Managed/UIElementsUtility.cs:71) UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr) (at V:/unity/2017.1.p5/Runtime/IMGUI/Managed/GUIUtility.cs:186)