public void Draw() { main.Draw(); if (preview != null && main.serializedProperty.isExpanded) { preview.Draw(); } }
public override void OnInspectorGUI() { EditorGUILayout.PropertyField(terrain); if (terrain.objectReferenceValue) { soundsSets.Draw(); if (GUILayout.Button("Update")) { target.UpdateSoundsSetsCount(); } } serializedObject.ApplyModifiedProperties(); }