2011
06.20

Unity3D Borderless

Here is a quick script to get unity borderless :)

Press read more for the code

11 comments so far

Add Your Comment
  1. This is really usefull!!!

    Unfortunately it seems, that this doesnt work, when you want to switch between fullscreen- and windowed- mode. Whenn “comming back” from full-screen the window again has its borders and looses the position.
    Is there a possibility to make that work too??

    Best regards, Josef!

  2. true, you have to run the function every time you change from fullscreen.
    Be aware that this is not true fullscreen, i have no idea how this affects preformance.

  3. hey martijn,
    Is there a way to reset it so it has window border?
    Greetz
    Robert

  4. PS:

    Is there a way to make parts transparent like old unity startup had or other applications (like cutouts)…?

    PSPS: where did u get the information about that?

    Greetz
    Robert

  5. hey 2 updates for you all :D

    NEVER RUN THE SCENE IN EDITOR !!!! XD

    –> the border is hidden there too ;)

    it works fine on 64 bit and i dunno if it was smthng wrnog but without border it ran faster than with…..maybe the aero effect?

    greetz
    Robert ;)

  6. again its me, i use this to make a cutout in the window where color is black but it doesnt work, any help?

    SetWindowLong(GetForegroundWindow (), GWL_EXSTYLE, WS_EX_LAYERED);

    SetWindowLong(GetForegroundWindow (), GWL_STYLE, WS_BORDER);

    SetLayeredWindowAttributes(GetForegroundWindow (), 0, 0, LWA_COLORKEY);

  7. Thank you, this inspired me to make a my own borderless maximized windowed mode class. My version supports multiple monitors, and has keeping the taskbar visible as an optional behavior.

  8. Share it man! :)

  9. martijn may u take a look at the cutout thing pls? :)

  10. @Robert Schuh:

    This is nothing special. It’s just plain windows API stuff ;)

    What you want is to set a window region i guess. You can do funny things with it. What exactly do you want to cut out?

    http://msdn.microsoft.com/en-us/library/aa930600.aspx

  11. You can also use the -popupwindow commandline parameter to create a borderless window:

    http://docs.unity3d.com/Documentation/Manual/CommandLineArguments.html