Quantcast
Channel: Questions in topic: "gui"
Viewing all articles
Browse latest Browse all 125

How to get spacing between inspector property labels and fields?

$
0
0
2020.3.11f1 From a PropertyDrawer, how do I get the horizontal spacing between property labels and fields in the inspector? ![alt text][1] The controls in the above image were drawn with: public override void OnGUI (Rect pos, SerializedProperty property, GUIContent label) { EditorGUI.BeginProperty(pos, label, property); EditorGUI.DrawRect(new Rect(pos.x, pos.y, EditorGUIUtility.labelWidth, EditorGUIUtility.singleLineHeight), Color.blue); EditorGUI.TextField(pos, new GUIContent(" "), ""); EditorGUI.EndProperty(); } Thanks. [1]: https://forum.unity.com/attachments/upload_2021-6-13_20-32-40-png.870944/

Viewing all articles
Browse latest Browse all 125

Trending Articles



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