Skip to content

Commit 0807248

Browse files
committed
Add no music warning
1 parent 1aa49a4 commit 0807248

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

Scripts/Editor/SettingProperties.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,13 @@ internal static class SettingProperties
88
public static void Draw(SerializedObject obj)
99
{
1010
// Music
11-
DrawProperty("music", SettingStyles.music, obj);
11+
var music = obj.FindProperty("music");
12+
DrawProperty(music, SettingStyles.music);
13+
14+
if (music.objectReferenceValue == null)
15+
{
16+
EditorGUILayout.HelpBox("No music provided!", MessageType.Error);
17+
}
1218

1319
// Font
1420
DrawProperty("font", SettingStyles.font, obj);

0 commit comments

Comments
 (0)