I have a strange errors in EditorGUILayout.ObjectField()
Errors are
1. Cannot convert from GUIContent to Object
2. Cannot convert from System.Collections.Generic.List<> to System.Type
3. Cannot convert from System.Type to GUILayoutOption
4. Cannot convert from bool to GUILayoutOption
I call this function so
road_editor.roads = EditorGUILayout.ObjectField(new GUIContent("Roads", "List of created roads"), road_editor.roads, typeof(List), true) as List;
but in the next line I call this function differently and it works fine
road_editor.material = EditorGUILayout.ObjectField(new GUIContent("Material", "The material of the road"), road_editor.material, typeof(Material), true) as Material;
So I don't understand what is difference between these lines. (I'm sorry if I made mistakes in my English)
↧