@@ -550,8 +550,10 @@ private void CommonSettings()
550
550
// Get icons and icon sizes for selected platform (or default)
551
551
GUI . changed = false ;
552
552
string platformName = "" ;
553
- Texture2D [ ] icons = PlayerSettings . GetIconsForPlatform ( platformName ) ;
554
- int [ ] widths = PlayerSettings . GetIconWidthsForPlatform ( platformName ) ;
553
+ Texture2D [ ] icons = PlayerSettings . GetAllIconsForPlatform ( platformName ) ;
554
+ int [ ] widths = PlayerSettings . GetIconWidthsOfAllKindsForPlatform ( platformName ) ;
555
+ IconKind [ ] kinds = PlayerSettings . GetIconKindsForPlatform ( platformName ) ;
556
+
555
557
// Ensure the default icon list is always populated correctly
556
558
if ( icons . Length != widths . Length )
557
559
{
@@ -562,7 +564,7 @@ private void CommonSettings()
562
564
if ( GUI . changed )
563
565
{
564
566
Undo . RecordObject ( this . target , Styles . undoChangedIconString ) ;
565
- PlayerSettings . SetIconsForPlatform ( platformName , icons ) ;
567
+ PlayerSettings . SetIconsForPlatform ( platformName , icons , kinds ) ;
566
568
}
567
569
568
570
GUILayout . Space ( 3 ) ;
@@ -648,9 +650,10 @@ private void IconSectionGUI(BuildTargetGroup targetGroup, ISettingEditorExtensio
648
650
else
649
651
{
650
652
// Get icons and icon sizes for selected platform (or default)
651
- Texture2D [ ] icons = PlayerSettings . GetIconsForPlatform ( platformName ) ;
652
- int [ ] widths = PlayerSettings . GetIconWidthsForPlatform ( platformName ) ;
653
- int [ ] heights = PlayerSettings . GetIconHeightsForPlatform ( platformName ) ;
653
+ Texture2D [ ] icons = PlayerSettings . GetAllIconsForPlatform ( platformName ) ;
654
+ int [ ] widths = PlayerSettings . GetIconWidthsOfAllKindsForPlatform ( platformName ) ;
655
+ int [ ] heights = PlayerSettings . GetIconHeightsOfAllKindsForPlatform ( platformName ) ;
656
+ IconKind [ ] kinds = PlayerSettings . GetIconKindsForPlatform ( platformName ) ;
654
657
655
658
bool overrideIcons = true ;
656
659
@@ -671,7 +674,7 @@ private void IconSectionGUI(BuildTargetGroup targetGroup, ISettingEditorExtensio
671
674
icons = new Texture2D [ 0 ] ;
672
675
673
676
if ( GUI . changed )
674
- PlayerSettings . SetIconsForPlatform ( platformName , icons ) ;
677
+ PlayerSettings . SetIconsForPlatform ( platformName , icons , kinds ) ;
675
678
}
676
679
}
677
680
@@ -686,17 +689,23 @@ private void IconSectionGUI(BuildTargetGroup targetGroup, ISettingEditorExtensio
686
689
{
687
690
// Spotlight icons begin with 120 but there are two in the list.
688
691
// So check if the next one is 80.
689
- if ( i + 1 < widths . Length && widths [ i + 1 ] == 80 )
692
+ if ( kinds [ i ] == IconKind . Spotlight && kinds [ i - 1 ] != IconKind . Spotlight )
690
693
{
691
694
Rect labelRect = GUILayoutUtility . GetRect ( EditorGUIUtility . labelWidth , 20 ) ;
692
695
GUI . Label ( new Rect ( labelRect . x , labelRect . y , EditorGUIUtility . labelWidth , 20 ) , "Spotlight icons" , EditorStyles . boldLabel ) ;
693
696
}
694
697
695
- if ( widths [ i ] == 87 )
698
+ if ( kinds [ i ] == IconKind . Settings && kinds [ i - 1 ] != IconKind . Settings )
696
699
{
697
700
Rect labelRect = GUILayoutUtility . GetRect ( EditorGUIUtility . labelWidth , 20 ) ;
698
701
GUI . Label ( new Rect ( labelRect . x , labelRect . y , EditorGUIUtility . labelWidth , 20 ) , "Settings icons" , EditorStyles . boldLabel ) ;
699
702
}
703
+
704
+ if ( kinds [ i ] == IconKind . Notification && kinds [ i - 1 ] != IconKind . Notification )
705
+ {
706
+ Rect labelRect = GUILayoutUtility . GetRect ( EditorGUIUtility . labelWidth , 20 ) ;
707
+ GUI . Label ( new Rect ( labelRect . x , labelRect . y , EditorGUIUtility . labelWidth , 20 ) , "Notification icons" , EditorStyles . boldLabel ) ;
708
+ }
700
709
}
701
710
702
711
Rect rect = GUILayoutUtility . GetRect ( kSlotSize , Mathf . Max ( kSlotSize , previewHeight ) + kIconSpacing ) ;
@@ -720,7 +729,7 @@ private void IconSectionGUI(BuildTargetGroup targetGroup, ISettingEditorExtensio
720
729
721
730
// Preview
722
731
Rect previewRect = new Rect ( rect . x + width - kMaxPreviewSize , rect . y , previewWidth , previewHeight ) ;
723
- Texture2D closestIcon = PlayerSettings . GetIconForPlatformAtSize ( platformName , widths [ i ] , heights [ i ] ) ;
732
+ Texture2D closestIcon = PlayerSettings . GetIconForPlatformAtSize ( platformName , widths [ i ] , heights [ i ] , kinds [ i ] ) ;
724
733
if ( closestIcon != null )
725
734
GUI . DrawTexture ( previewRect , closestIcon ) ;
726
735
else
@@ -730,7 +739,7 @@ private void IconSectionGUI(BuildTargetGroup targetGroup, ISettingEditorExtensio
730
739
if ( GUI . changed )
731
740
{
732
741
Undo . RecordObject ( this . target , Styles . undoChangedIconString ) ;
733
- PlayerSettings . SetIconsForPlatform ( platformName , icons ) ;
742
+ PlayerSettings . SetIconsForPlatform ( platformName , icons , kinds ) ;
734
743
}
735
744
GUI . enabled = enabled ;
736
745
@@ -1278,7 +1287,8 @@ private void OtherSectionRenderingGUI(BuildPlatform platform, BuildTargetGroup t
1278
1287
|| targetGroup == BuildTargetGroup . XboxOne
1279
1288
|| targetGroup == BuildTargetGroup . WSA
1280
1289
|| targetGroup == BuildTargetGroup . WiiU
1281
- || targetGroup == BuildTargetGroup . WebGL )
1290
+ || targetGroup == BuildTargetGroup . WebGL
1291
+ || targetGroup == BuildTargetGroup . Switch )
1282
1292
{
1283
1293
using ( new EditorGUI . DisabledScope ( EditorApplication . isPlaying ) ) // switching color spaces in play mode is not supported
1284
1294
{
0 commit comments