If you have created an PlayerIcon.icns & UnityPlayerIcon.png and want to use those just put it them in the folders described below and Run “OSX Icon" to copy them to Contents/resources in your build.
WHAT | DIR |
---|---|
PlayerIcon.icns | 2_Icons/MyOsxIcon/ |
UnityPlayerIcon.png | 2_Icons/MyUnityPlayerIcon/ |
Either use this icon as a base or:
- Create a PNG file of 1024x1024 pixels.
- Name the file “Icon1024.png”
- Make sure it has an alpha channel.
- Replace your file with the dummy in this folder
- Run “OSX Icon”
- Check and set the color profile to sRGB IEC61966-2.1
- Double check if your file has the correct size, alpha channel, is square, is png)
- Create an iconset from your image. With correct naming convention and size.
- From that iconset it will create an PlayerIcon.icns file.
- Create a UnityPlayerIcon.png in correct size (64x64)
- Copy both “UnityPlayerIcon.png” and “PlayerIcon.icns” to “1_MyBuild/YOUR.APP/Contents/Resources” and replace what unity made.
- For automation features call
./OSX\ Icon -h
On High Sierra there is no way to create an icns file that includes all 10 required sizes through icon util (Everything but 16X16@1x and 32x32@1x). The only way to do this is to run this script on an older OS. I believe I did it with Sierra. You can open .ICNS files with preview to double check. I am not sure if this is a problem though. I have read not all are necessary. But if you are obsessive on details like me there is no other way. Believe me I have tried it all. Nothing worked besides running the IconUtil on an older OS.
- UnityPlayerIcon.png doesn’t get updated by Unity
- The .icns file Unity creates does not include all needed sizes
- Every time you build both of the above are overwritten by Unity.
- Create a dummy project in Xcode and copy .ICNS file after build. It did not work for me (High Sierra). My ICNS file only included 4 sizes of the 10. To create all the needed image files you could still use this script. When prompted for delete clutter just enter "n". You will find an iconset with all the sizes here.
- QUOTE "BrainAndBrain" " Create icns file using XCode: make a dummy project, open Assets.xcassets, and fill in the information. Build the app and open it to extract the icns file.
- Create a 64X64@72dpi png file of your icon.
- Place your ICNS file and UnityPlayerIcon.png in YOUR_APP/Contents/Resources/
Filename | Pixel size |
---|---|
icon_512x512@2x.png | 1024 x 1024 @ 144 dpi |
icon_512x512.png | 512 x 512 @ 72 dpi |
icon_256x256@2x.png | 512 x 512 @ 144 dpi |
icon_256x256.png | 256 x 256 @ 72 dpi |
icon_128x128@2x.png | 256 x 256 @ 144 dpi |
icon_128x128.png | 128 x 128 @ 72 dpi |
icon_32x32@2x.png | 64 x 64 @ 144 dpi |
icon_32x32.png | 32 x 32 @ 72 dpi |
icon_16x16@2x.png | 32 x 32 @ 144 dpi |
icon_16x16.png | 16 x 16 @ 72 dpi |