Skip to content

Commit c1f3fcb

Browse files
committed
Add missing iOS icons
1 parent af53118 commit c1f3fcb

File tree

2 files changed

+123
-66
lines changed

2 files changed

+123
-66
lines changed

Assets/Scripts/Editor/GameVariantSwitcher.cs

Lines changed: 24 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -78,29 +78,45 @@ private static void ApplyPlayerSettingsForVariant(string appName)
7878
{
7979
PlayerSettings.SetApplicationIdentifier(target,
8080
$"{GameConstants.AppIdentifierPrefix}.{appName}");
81-
81+
8282
// Set app icon
83-
int[] iconSizes = PlayerSettings.GetIconSizes(target, IconKind.Application);
8483
PlayerSettings.SetIcons(target,
85-
Enumerable.Repeat(gameIcon, iconSizes.Length).ToArray(),
84+
Enumerable.Repeat(gameIcon,
85+
PlayerSettings.GetIconSizes(target, IconKind.Application).Length).ToArray(),
8686
IconKind.Application);
8787

88-
// Set iOS store icon which is required for store publishing or TestFlight
88+
// Set settings icon
89+
PlayerSettings.SetIcons(target,
90+
Enumerable.Repeat(gameIcon,
91+
PlayerSettings.GetIconSizes(target, IconKind.Settings).Length).ToArray(),
92+
IconKind.Settings);
93+
94+
// Set notification icon
95+
PlayerSettings.SetIcons(target,
96+
Enumerable.Repeat(gameIcon,
97+
PlayerSettings.GetIconSizes(target, IconKind.Notification).Length).ToArray(),
98+
IconKind.Notification);
99+
100+
// Set iOS store and spotlight icon which are required for store publishing or TestFlight
89101
if (target == NamedBuildTarget.iOS)
90102
{
91103
PlayerSettings.SetIcons(target,
92104
Enumerable.Repeat(gameIcon,
93105
PlayerSettings.GetIconSizes(target, IconKind.Store).Length).ToArray(),
94106
IconKind.Store);
107+
PlayerSettings.SetIcons(target,
108+
Enumerable.Repeat(gameIcon,
109+
PlayerSettings.GetIconSizes(target, IconKind.Spotlight).Length).ToArray(),
110+
IconKind.Spotlight);
95111
}
96112
}
97-
113+
98114
// Set default app icon (I don't know why Unity decided to use NamedBuildTarget.Unknown here but it is what it is)
99115
{
100-
int[] iconSizes = PlayerSettings.GetIconSizes(NamedBuildTarget.Unknown, IconKind.Application);
101116
PlayerSettings.SetIcons(NamedBuildTarget.Unknown,
102-
Enumerable.Repeat(gameIcon, iconSizes.Length).ToArray(),
103-
IconKind.Application);
117+
Enumerable.Repeat(gameIcon,
118+
PlayerSettings.GetIconSizes(NamedBuildTarget.Unknown, IconKind.Application).Length).ToArray(),
119+
IconKind.Application);
104120
}
105121
}
106122
}

ProjectSettings/ProjectSettings.asset

Lines changed: 99 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -393,114 +393,155 @@ PlayerSettings:
393393
m_Kind: 4
394394
- m_BuildTarget: tvOS
395395
m_Icons: []
396+
- m_BuildTarget: Android
397+
m_Icons:
398+
- serializedVersion: 2
399+
m_Icon: {fileID: 2800000, guid: 6b32649dccc45df4ebe8e3f8eccee249, type: 3}
400+
m_Width: 192
401+
m_Height: 192
402+
m_Kind: 0
403+
- serializedVersion: 2
404+
m_Icon: {fileID: 2800000, guid: 6b32649dccc45df4ebe8e3f8eccee249, type: 3}
405+
m_Width: 144
406+
m_Height: 144
407+
m_Kind: 0
408+
- serializedVersion: 2
409+
m_Icon: {fileID: 2800000, guid: 6b32649dccc45df4ebe8e3f8eccee249, type: 3}
410+
m_Width: 96
411+
m_Height: 96
412+
m_Kind: 0
413+
- serializedVersion: 2
414+
m_Icon: {fileID: 2800000, guid: 6b32649dccc45df4ebe8e3f8eccee249, type: 3}
415+
m_Width: 72
416+
m_Height: 72
417+
m_Kind: 0
418+
- serializedVersion: 2
419+
m_Icon: {fileID: 2800000, guid: 6b32649dccc45df4ebe8e3f8eccee249, type: 3}
420+
m_Width: 48
421+
m_Height: 48
422+
m_Kind: 0
423+
- serializedVersion: 2
424+
m_Icon: {fileID: 2800000, guid: 6b32649dccc45df4ebe8e3f8eccee249, type: 3}
425+
m_Width: 36
426+
m_Height: 36
427+
m_Kind: 0
396428
m_BuildTargetPlatformIcons:
397429
- m_BuildTarget: iPhone
398430
m_Icons:
399431
- m_Textures:
400-
- {fileID: 0}
401-
m_Width: 60
402-
m_Height: 60
403-
m_Kind: 2
432+
- {fileID: 2800000, guid: 6b32649dccc45df4ebe8e3f8eccee249, type: 3}
433+
m_Width: 180
434+
m_Height: 180
435+
m_Kind: 0
404436
m_SubKind: iPhone
405437
- m_Textures:
406-
- {fileID: 0}
407-
m_Width: 40
408-
m_Height: 40
409-
m_Kind: 2
438+
- {fileID: 2800000, guid: 6b32649dccc45df4ebe8e3f8eccee249, type: 3}
439+
m_Width: 120
440+
m_Height: 120
441+
m_Kind: 0
410442
m_SubKind: iPhone
411443
- m_Textures:
412-
- {fileID: 0}
413-
m_Width: 40
414-
m_Height: 40
415-
m_Kind: 2
444+
- {fileID: 2800000, guid: 6b32649dccc45df4ebe8e3f8eccee249, type: 3}
445+
m_Width: 167
446+
m_Height: 167
447+
m_Kind: 0
416448
m_SubKind: iPad
417449
- m_Textures:
418-
- {fileID: 0}
419-
m_Width: 20
420-
m_Height: 20
421-
m_Kind: 2
422-
m_SubKind: iPad
423-
- m_Textures: []
424-
m_Width: 120
425-
m_Height: 120
426-
m_Kind: 3
427-
m_SubKind: iPhone
428-
- m_Textures: []
429-
m_Width: 80
430-
m_Height: 80
431-
m_Kind: 3
432-
m_SubKind: iPhone
433-
- m_Textures: []
434-
m_Width: 80
435-
m_Height: 80
436-
m_Kind: 3
450+
- {fileID: 2800000, guid: 6b32649dccc45df4ebe8e3f8eccee249, type: 3}
451+
m_Width: 152
452+
m_Height: 152
453+
m_Kind: 0
437454
m_SubKind: iPad
438-
- m_Textures: []
439-
m_Width: 40
440-
m_Height: 40
441-
m_Kind: 3
455+
- m_Textures:
456+
- {fileID: 2800000, guid: 6b32649dccc45df4ebe8e3f8eccee249, type: 3}
457+
m_Width: 76
458+
m_Height: 76
459+
m_Kind: 0
442460
m_SubKind: iPad
443-
- m_Textures: []
461+
- m_Textures:
462+
- {fileID: 2800000, guid: 6b32649dccc45df4ebe8e3f8eccee249, type: 3}
444463
m_Width: 87
445464
m_Height: 87
446465
m_Kind: 1
447466
m_SubKind: iPhone
448-
- m_Textures: []
467+
- m_Textures:
468+
- {fileID: 2800000, guid: 6b32649dccc45df4ebe8e3f8eccee249, type: 3}
449469
m_Width: 58
450470
m_Height: 58
451471
m_Kind: 1
452472
m_SubKind: iPhone
453-
- m_Textures: []
473+
- m_Textures:
474+
- {fileID: 2800000, guid: 6b32649dccc45df4ebe8e3f8eccee249, type: 3}
454475
m_Width: 29
455476
m_Height: 29
456477
m_Kind: 1
457478
m_SubKind: iPhone
458-
- m_Textures: []
479+
- m_Textures:
480+
- {fileID: 2800000, guid: 6b32649dccc45df4ebe8e3f8eccee249, type: 3}
459481
m_Width: 58
460482
m_Height: 58
461483
m_Kind: 1
462484
m_SubKind: iPad
463-
- m_Textures: []
485+
- m_Textures:
486+
- {fileID: 2800000, guid: 6b32649dccc45df4ebe8e3f8eccee249, type: 3}
464487
m_Width: 29
465488
m_Height: 29
466489
m_Kind: 1
467490
m_SubKind: iPad
468491
- m_Textures:
469492
- {fileID: 2800000, guid: 6b32649dccc45df4ebe8e3f8eccee249, type: 3}
470-
m_Width: 180
471-
m_Height: 180
472-
m_Kind: 0
493+
m_Width: 60
494+
m_Height: 60
495+
m_Kind: 2
473496
m_SubKind: iPhone
474497
- m_Textures:
475498
- {fileID: 2800000, guid: 6b32649dccc45df4ebe8e3f8eccee249, type: 3}
476-
m_Width: 120
477-
m_Height: 120
478-
m_Kind: 0
499+
m_Width: 40
500+
m_Height: 40
501+
m_Kind: 2
479502
m_SubKind: iPhone
480503
- m_Textures:
481504
- {fileID: 2800000, guid: 6b32649dccc45df4ebe8e3f8eccee249, type: 3}
482-
m_Width: 167
483-
m_Height: 167
484-
m_Kind: 0
485-
m_SubKind: iPad
486-
- m_Textures:
487-
- {fileID: 2800000, guid: 6b32649dccc45df4ebe8e3f8eccee249, type: 3}
488-
m_Width: 152
489-
m_Height: 152
490-
m_Kind: 0
505+
m_Width: 40
506+
m_Height: 40
507+
m_Kind: 2
491508
m_SubKind: iPad
492509
- m_Textures:
493510
- {fileID: 2800000, guid: 6b32649dccc45df4ebe8e3f8eccee249, type: 3}
494-
m_Width: 76
495-
m_Height: 76
496-
m_Kind: 0
511+
m_Width: 20
512+
m_Height: 20
513+
m_Kind: 2
497514
m_SubKind: iPad
498515
- m_Textures:
499516
- {fileID: 2800000, guid: 6b32649dccc45df4ebe8e3f8eccee249, type: 3}
500517
m_Width: 1024
501518
m_Height: 1024
502519
m_Kind: 4
503520
m_SubKind: App Store
521+
- m_Textures:
522+
- {fileID: 2800000, guid: 6b32649dccc45df4ebe8e3f8eccee249, type: 3}
523+
m_Width: 120
524+
m_Height: 120
525+
m_Kind: 3
526+
m_SubKind: iPhone
527+
- m_Textures:
528+
- {fileID: 2800000, guid: 6b32649dccc45df4ebe8e3f8eccee249, type: 3}
529+
m_Width: 80
530+
m_Height: 80
531+
m_Kind: 3
532+
m_SubKind: iPhone
533+
- m_Textures:
534+
- {fileID: 2800000, guid: 6b32649dccc45df4ebe8e3f8eccee249, type: 3}
535+
m_Width: 80
536+
m_Height: 80
537+
m_Kind: 3
538+
m_SubKind: iPad
539+
- m_Textures:
540+
- {fileID: 2800000, guid: 6b32649dccc45df4ebe8e3f8eccee249, type: 3}
541+
m_Width: 40
542+
m_Height: 40
543+
m_Kind: 3
544+
m_SubKind: iPad
504545
- m_BuildTarget: Android
505546
m_Icons:
506547
- m_Textures: []

0 commit comments

Comments
 (0)