The definitive guide on packaging icons for Windows executables

Here’s the ultimate guide you’ve all been waiting for :stuck_out_tongue:

See if you can relate: So, I’ve recently spent about 2 days (yes, 2 days…) trying to figure out what was wrong with my packaging process, as whenever I was exporting my game for Windows, the resulting icon for my .exe was either fully or partially not displaying as I expected it to (and by partially I mean good for some sizes, but broken or using the default UE icon for other sizes). Therefore, after spending literally hours on all possible forum threads with no result whatsoever, I’ve finally managed to figure out what was going wrong, so I’m here to save you all from a lot of headaches and unneeded hassle. Please, read on:

  1. As you probably know, the .ico which Unreal Engine uses is a compound / combined file which has multiple versions of your icon at various sizes. It’s kind of like the Mip-map of a texture or the LoD of a mesh, but with one very specific mention: it uses a strict table of sizes, from which you must NOT deviate (at all):

16 x 16
24 x 24
32 x 32
40 x 40
48 x 48
64 x 64
256 x 256

  1. Now that you know what you need to have, the question then becomes how? and for that, let me again spare you from the endless pursuit of “which software is the best”, and save you many hours of trial-and-error by going directly to the solution. So head over to the website and do the following:
  • Upload your icon (preferably in a lossless format like .png or .bmp and not lossy like .jpg) using a perfectly square aspect ratio! Size-wise it’s best to use a power-of-two, but it’s not mandatory. What IS mandatory, however, is for your upload to be a minimum of 256x256. I’m not going to tell you how to do that, as I assume you are capable of generating your own image with no issues.
  • Make sure once more that the Aspect Ratio under the Crop Image settings is set to Square!
  • Under Configure Icon make sure you only check all the boxes of the above set of dimensions! Here you will notice 2 things:
    • First, you must add the missing 40x40 size!
    • Second, you must un-select the 96x96, 128x128 and 512x512 sizes!
  • Please, DO NOT (I repeat: do not) feel tempted to think “the more = the better” and leave extra fields selected, so really make sure you ONLY have the sizes given in the list above!
  • Click “Download”, preview your resulting .ico one more time for all the selected sizes, then proceed with actually saving your file to the disk.
  1. Now the part you’ve been waiting for: open your project in the Unreal Editor and under Project Settings, go all the way to Platforms and then Windows. Here, select your newly downloaded .ico file as the icon to be used. After the image changes successfully in the nearby thumbnail, hover your mouse over it once more and confirm that UE actually created a file called Application.ico which is stored under your “…/Build/Windows/Application.ico” directory. Also, manually navigate to that folder and check that the created .ico is indeed the one you wish to use!

  2. At this step, proceed with Building + Cooking + Packaging your project so that UE can now use your newly assigned icon. Again, I won’t tell you how to do that, as it’s outside the scope of this tutorial.

  3. Here comes the final, yet trickiest part (you have no idea how important this is!): Clearing your icon & thumbnail cache by pressing Win + R, then navigating to %localappdata%\Microsoft\Windows\Explorer and deleting all the files that begin with “iconcache_”, as well as those that begin with “thumbcache_”.

  4. RESTART YOUR COMPUTER! Please, don’t make the mistake of not doing this final step, as you’ll spend hours, if not days, trying to understand why the icon and thumbnail cache is not properly rebuilt despite deleting them, as your icon will still be the old one!

So… there you go! :slight_smile: Hope it helps you out! If not, just let me know if anything goes wrong and I’ll be happy to respond :wink:

8 Likes

Trying to delete those files I get a windows error saying Explorer has the files opened.

I’ll try creating another windows user.

use lockhunter program to delete.

1 Like

none of this works it only changes EXE format, you can still get the default icon to work by simply deleting your *\Build\Windows\Application.ico file.

The default “U” unreal icon will work flawlessly in all categories.

The REAL problem is the unreal devs being lazy icky words (like always).

They have NEVER in any documentation told us HOW to format our icons. Lazy elitist gatekeeping.

If anyone has the ABSOLUTE CORRECT WORKING DIMENSIONS FOR NOT ONLY THE STUPID WINDOWS ICON BUT ALSO THE TASKBAR AND TITLE BAR ICONS could you please post them.

@icierva A normal restart should do, if not, then try using a program like Unlocker v1.9.2 and see if it helps!

@Seedro From all of my tests, I can tell you that the solution I have posted above will correctly display your custom icon, not just for the Windows file explorer, but also for the taskbar and titlebar.

In case anyone uses Unreal for builds outside of the Windows platform, I’d be happy to know if they had any problems with my method, or if everything works well!