Problem When use "Custom Editor" and "Property Drawers" The Same Time

When you use "Custom Editor" for a custom class (Mark as A,Use DrawDefaultInspector () in OnInspectorGUI()), And the class contain a list of other class(Mark as B) which will use custom property Drawers.It will run to a problem.The list property of class A will pass to the onGui function of the B's property Drawers too.So if  you use the function FindPropertyRelative in the custom property Drawers.you will get a NullReferenceException.It maybe a bug of unity.you can use "property.isArray" to ignore the exception input of onGui of custom property Drawers..
已标记关键词 清除标记
相关推荐
©️2020 CSDN 皮肤主题: 大白 设计师:CSDN官方博客 返回首页