Quantcast
Channel: Questions in topic: "error message"
Viewing all articles
Browse latest Browse all 2891

Strange error in EditorGUILayout.ObjectField()

$
0
0
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)

Viewing all articles
Browse latest Browse all 2891

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>