x


Borderless window in standalone player

Is it possible to make the Unity windows standalone player run borderless? This would be similar to the OSX Dashboard Widget.


function Start ()
{
 if (Application.platform == RuntimePlatform.WindowsPlayer)
 {
    Screen.fullScreen = false;

    print("Disable window border here");
 }
}

more ▼

asked Mar 12 '10 at 07:33 PM

lowbloodsugar gravatar image

lowbloodsugar
433 9 11 16

Why is this a wiki?

Mar 12 '10 at 08:31 PM Michael La Voie

This confuses me too... what is going on here?

Mar 13 '10 at 02:31 PM Motionreactor

This seems like a really sensible question to me. I have done this sort of thing in prior games, and it would be really nice to be able to do it with Unity, too.

Mar 21 '10 at 01:07 AM x4000

As far as I know, there is no option on the API to run your app borderless :(, if you get to know how, let me know :)

Mar 22 '10 at 01:21 PM naruse
(comments are locked)
10|3000 characters needed characters left

4 answers: sort voted first

You can use external tools such as AutoHotKey to get rid of the window decorations/borders/title. Note however that Unity's rendering canvas will be scaled, not resized, so you will lose some Anti-Aliasing quality - unless you have AA disabled, in which case you will gain some antialiasing due to the interpolated scaling.

Take a look at this thread for detailed information: http://forums.darkfallonline.com/showthread.php?t=242644

more ▼

answered Oct 27 '10 at 06:05 PM

Wolfram gravatar image

Wolfram
9k 8 20 52

(comments are locked)
10|3000 characters needed characters left

No, it is not possible at the moment. Maybe with Unity3.

more ▼

answered May 10 '10 at 08:41 PM

KHopcraft gravatar image

KHopcraft
204 1 9

(comments are locked)
10|3000 characters needed characters left

Of course it's easy. I do it by creating a shortcut or batch file that starts the exe, instead of running the exe file. For example, a batch file. This is just an example, so say our EXE name is RUN.EXE. You would open Notepad, type the following:

start RUN.EXE -popupwindow

Then File> Save as> and in the filename where it says .txt origionally, just remove that and use an asterick and a bat extension (*.bat) Hit ENTER, then it will know you want to save as a bat file. Now just type in a name like Launcher.bat, don't forget to remove the asterick but keep the .bat extension. Now you would run this Launcher file. The argument -popupwindow is what allows your Unity Standalone EXE to run without borders :D

more ▼

answered Dec 13 '12 at 09:36 PM

clunk47 gravatar image

clunk47
2.8k 2 8

Also if you create a shortcut to your exe on your desktop, just go to the shortcut properties and add the -popupwindow argument to the target.

Dec 13 '12 at 09:37 PM clunk47

hey, great solution!!! i wish i could vote this up =)

Feb 08 at 04:57 PM tkcast
(comments are locked)
10|3000 characters needed characters left

Create a cocoa framework enabled bundle in XCode 4 and perform the following objective-c function call somewhere inside an external function: (See Unity3d plugins for more on this)

[[[NSApplication sharedApplication] mainWindow] setStyleMask:NSBorderlessWindowMask];

This will set the window border at runtime to a borderless window.

more ▼

answered May 15 '11 at 05:33 AM

AIResearcher gravatar image

AIResearcher
65 7 8 13

Please note* Screen.SetResolution( ... ); will add the border back. I'm not sure if this is because of the way Unity resizes the window or if they create a new window all together that then must be changed.

May 15 '11 at 05:58 AM AIResearcher

This doesn't work as it leaves a white 20 pix bar at the top of the screen

Dec 19 '12 at 03:54 AM arkon

Dude why cocoa lol just run w/ argument -popupwindow

Dec 19 '12 at 05:15 AM clunk47

-popupwindow doesn't work on mac builds only windows builds. Plus to add the argument on a mac app would invalidate the apple signing for the app store.

Dec 19 '12 at 05:27 AM arkon

Yeah -popupwindow only works in windows, so do EXE files. I figured that would be quite an obvious match.

Dec 19 '12 at 05:45 AM clunk47
(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x381
x171
x85
x28

asked: Mar 12 '10 at 07:33 PM

Seen: 2798 times

Last Updated: Feb 08 at 04:57 PM