Search Issue Tracker
By Design
Votes
0
Found in [Package]
Issue ID
1181718
Regression
No
[Mobile Notifications] Small Icons appear white in the Preview
In the Mobile Notification window, the Preview of Small Icons is white
To reproduce:
- open this project
- go to Project Settings-> Mobile Notifications
- notice the Preview is white
- doesn't seem to matter if the image has alpha or not
- if it's for Large Icons, the preview looks fine
Reproduced with 2019.2.1f2 and 2019.3.0b1
Reproduced with package version 1.0.0, 1.0.2 and 1.0.3
Doesn't seem to be a regression.
-
KaveeM2007
May 21, 2022 07:18
How I solved it - Open an image editing software (Photoshop) and erase the things that you don't want in the icon ( this means the background , logos and other unwanted things). The reason is, small icon of android notifications in the mobile notification settings of Unity can only be shown by using alpha channels. further more, the parts of the image or texture which aren't transparent will be seen and the parts which are transparent wont be seen. So, you might understand that this will be a black&white icon. When you are editing in the image editing software, leave everything that you need to be scene, their color doesn't matter cuz at the end they will be just white.
If you want a background, try changing the alpha values of the background and the icon( the particular shape which is considered as the icon , ex - A sword as the icon and a background for it)
if you make the background's alpha values less, it will become a bit transparent than the icon(sword in my example), if you do the opposite, let's say you deceased the icon's alpha value, and increased the background, the opposite would happen. [ I didn't practically check this but according to my knowledge this should work)
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Crash on mdb_node_search when opening a project
- [macOS] Unable to install VisionOS Module on Hub
- NullReferenceException is thrown when pressing the "Enter" key to select an item in a ListView
- Burst internal compiler errors are thrown when creating a new 2D project
- Tile Paint action disappears from Undo History when Tile Selection tool has been used beforehand
Resolution Note:
Small notification icons are [required](https://material.io/design/platform-guidance/android-notifications.html#anatomy-of-a-notification) to be monochrome and Android ignores all non-alpha channels in the icon image, therefore Unity automatically strips all RGB channels. You can also provide icons by putting them in the `\Assets\Plugins\Android\res\drawable-{scaleFactor}`folder in that case they will not be automatically processed, however icons which contain non alpha channel will not be correctly displayed on Android 5.0 and above.
The notification color can be modified by setting the `AndroidNotification.Color` property.