I show you the basics of creating a custom inspector without wasting any time!
Sometimes you will want to use GUILayout and other times EditorGUILayout. EditorGUILayout is basically for making the kind of widgets you see in inspectors. If they both have a version of the same widget, for example GUILayout.Toggle/EditorGUILayout.Toggle (for creating checkboxes), then the one in EditorGUILayout will make a checkbox that will usually look better in an inspector. In other words, check out EditorGUILayout first, then if it doesn't have what you want, check out GUILayout. It's a bit weird, but you get used to it.
GUILayout:
EditorGUILayout:
The official docs for Custom Inspectors:
Смотрите видео Unity Custom Inspectors in 100 seconds онлайн без регистрации, длительностью 01 минут 56 секунд в хорошем hd качестве. Это видео добавил пользователь Kemble Software 09 Апрель 2020, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 28 тысяч раз и оно понравилось 1 тысяч людям.