A downloadable extension

Download NowName your own price

Quick links: Source code

This small extension allows you to dynamically change window icon (also seen in taskbar) and taskbar badges (commonly used for notifications and such) in your GameMaker games.

Functions (GameMaker):

  • window_set_icon(path_to_ico)
    Changes the window icon. Path should point to a valid ICO file.
  • window_set_icon_buffer(buffer_with_an_ico_inside)
    Changes the window icon. The buffer should contain a valid ICO file.
  • window_set_icon_surface(surface, set_big_icon)
    Changes the window icon to match the pixels in a surface.
    "big" (32x32) icon may used for display in taskbar.
  • window_reset_icon()
    Resets the window icon to whatever it was on game start.
  • window_set_overlay_icon(path_to_ico, ?description)
    Changes the little overlay/notification badge icon shown in the corner of the window. Path should point to a valid ICO file.
  • window_set_overlay_icon_buffer(buffer_with_an_ico_inside, ?description)
    Changes the little overlay/notification badge icon shown in the corner of the taskbar button. The buffer should contain a valid ICO file.
  • window_set_overlay_icon_surface(surface, ?description)
    Changes the little overlay/notification badge icon shown in the corner of the taskbar button to match pixels in a surface.
  • window_reset_overlay_icon()
    Resets/removes the little overlay/notification badge icon.

Functions (C#):

  • WindowIconTools.SetIcon(texture2d or null, kind)
    Changes small or big icon for the window to match the given texture with format=BGRA32.
    In non-Unity C#, you provide an array of bgra bytes, width, and height instead of a texture.
  • WindowIconTools.SetOverlayIcon(texture2d or null, opt. description)
    Changes the overlay icon in the taskbar.
  • WindowIconTools.SetProgress(progressState, numCompleted, numTotal)
    This is an equivalent of the other extension I made and is only here because it didn't really "cost" anything to add.

So, for example, if you had a "some.ico" in your Included Files, you could do


Have fun !


Download NowName your own price

Click download now to get access to the following files:

window_set_icon.gmez 41 kB
window_set_icon.yymp 49 kB
WindowIconToolsUnity.unitypackage 2 kB
WindowIconTools.cs 10 kB

Development log


Log in with itch.io to leave a comment.

Is it possible to differenciate the icon in the top left corner and the icon in the taskbar? I want to make the icon in the top left transparent and the icon in the taskbar shouldn't be changed

As per description, window_set_icon_surface (GM) or kind argument in WindowIconTools.SetIcon (Unity) would let you control that.

Got it working!

Thanks for the quick reply

Hey YAL, there appears to be an error in that the line buffer_get_surface(_buf, _sf, 0,0); has 4 variables which will return an error. The way I fixed it was I manually went through the .gml of the extension and made it 3 arguments getting rid of the last ,0)

That’s because GMS2.3.1 changed the function signature (reducing argument count from 5 to 3), breaking every single extension released prior to that.

Awesome stuff!

Do you know if this works on Mac?


It does not. You would need to write a DyLib for that, this might be a clue if Apple didn't change API since then.

Feel free to send a PR if you manage to figure it out! Someone else said that they were looking into making this work with Linux.

This is super helpful! Thank you very much. Came from reddit, this is exactly what I needed!

On another note, do you know how to create a texture with the BGRA32 format? I can't seem to get one working in Unity, and converting it doesn't seem to be much use either. The progress bar is extremely useful though!

(1 edit) (+1)

For whatever reason you can't set a texture to import as BGRA, but you can create a new texture in BGRA format and carry over the pixels to it, like so (also seen in test project on git):

Texture2D ConvertTexture(Texture2D texture, TextureFormat format) {
    var tex = new Texture2D(texture.width, texture.height, format, false);
    return tex;

Thank you!


Thank you this is great!