TargetParameterCountException: Parameter count mismatch.
System.Delegate.CreateDelegate (System.Type type, System.Object firstArgument, System.Reflection.MethodInfo method, System.Boolean throwOnBindFailure, System.Boolean allowClosed) (at <6073cf49ed704e958b8a66d540dea948>:0)
报错修复记录:
最近在升级项目后,发现了一个EditorWindow的报错,百度Google搜了一遍发现是什么传参类型不对,
仔细查看报错信息,可以看到是打开EditorWindow时报的,然后最上层是 HostView.CreateDelegates, F12到HostView,
找到CreateDelegates
发现有个方法和我的EditorWindow自定义的方法名字一样,
怀疑是上面说的传参问题,因为我自定义的传参和Unity的HostView的传参肯定不一样,修改一下方法名,报错没了!(提供一种修复报错信息的思路)