slipster216 / VertexPaint

Unity 5.3 Vertex Painter
Other
906 stars 151 forks source link

'EditorGUILayout.ColorField `is ambiguous` error on import #32

Open baroquedub opened 3 years ago

baroquedub commented 3 years ago

Unity 2019.4.15 getting the following error on import:

The call is ambiguous between the following methods or properties: 'EditorGUILayout.ColorField(GUIContent, Color, bool, bool, bool, ColorPickerHDRConfig, params GUILayoutOption[])' and 'EditorGUILayout.ColorField(GUIContent, Color, bool, bool, bool, params GUILayoutOption[])'

Fixed, I think? by making an explicit reference to what type 'null' is.

VertexPainterWindow_GUI.cs line 464: orig: brushColor = EditorGUILayout.ColorField(new GUIContent("Brush Color"), brushColor, true, showAlpha, false, null);

change to: GUILayoutOption[] options = null; brushColor = EditorGUILayout.ColorField(new GUIContent("Brush Color"), brushColor, true, showAlpha, false, options);