블로그 이미지
Every unexpected event is a path to learning for you.

카테고리

분류 전체보기 (2328)N
Unity3D (572)N
Programming (472)
Unreal (4)
Gamebryo (56)
Tip & Tech (185)
협업 (34)
3DS Max (3)
Game (12)
Utility (116)
Etc (92)
Link (31)
Portfolio (19)
Subject (90)
iOS,OSX (38)
Android (13)
Linux (5)
잉여 프로젝트 (2)
게임이야기 (1)
Memories (19)
Interest (37)
Thinking (36)
한글 (26)
PaperCraft (5)
Animation (408)
Wallpaper (2)
재테크 (19)
Exercise (3)
나만의 맛집 (2)
냥이 (9)
육아 (9)
Total1,346,364
Today15
Yesterday155
Statistics Graph

달력

« » 2019.12
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 31        

공지사항

태그목록

Best Answer

Answer by clunk47 

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 originally, 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




[출처] http://answers.unity3d.com/questions/13009/borderless-window-in-standalone-player.html

Posted by blueasa

댓글을 달아 주세요

Welcome to the "Borderless Resizable Movable Standalone Window" Unity Asset.

Summary:
"Borderless Resizable Movable Standalone Window" is an Unity Plugin that gives you the ability to control the actual window position,size and borders of your standalone build via Scripting.
In other words it lets you remove the borders of your game's window and gives you the API to minimize,close,maximize,resize ect. through your scripts.
There are tons of creative ways to use it and implement it to your games/programs an example would be this template.
The package comes with 2 Example Scenes , 1 Launch Scene and 4 scripts (C# and Js) to help you start and understand its use.
Can be combined with Unity's current API to achieve great effects !
NOTE : It has been tested on Windows Unity Pro and Indie, other platforms are unknown!
So if you purchase for another platform do it at your own risk !!

What you actually get:
~A "QuickAutoBorderless" boolean that forces Borderless mode on the build on initialization without restarting it
~A "FullyAutoBorderless" boolean that forces Borderless mode on the build on initialization after restarting it
~A "AllowSizeResettingBeforeExit" boolean that makes the window start as a small 116x90 window instead of full size
~New Scripting API.
-Window.Minimize ();
-Window.Fullscreen ();
-Window.Fullscreen (Vector2);
-Window.Fullscreen (int,int);
-Window.Maximize ();
-Window.Maximize (boolean);
-Window.Exit ();
-Window.ForceExit ();
-Window.IsDoneLoading();
-Window.IsBorderless ();
-Window.Border ();
-Window.Border (boolean);
-Window.SetMinWidth (int);
-Window.SetMaxWidth (int);
-Window.SetMinHeight (int);
-Window.SetMaxHeight (int);
-Window.SetRect (Rect);
-Window.SetRect (int,int,int,int);
-Window.SetPosition (int,int);
-Window.SetPosition (Vector2);
-Window.SetSize (int,int);
-Window.SetSize (Vector2);
-Window.GetMinWidth ();
-Window.GetMaxWidth ();
-Window.GetMinHeight ();
-Window.GetMaxHeight ();
-Window.GetBorderRect ();
-Window.GetBorderPosition ();
-Window.GetBorderSize ();
-Window.GetRect ();
-Window.GetPosition ();
-Window.GetSize ();
-Window.GrabStart ();
-Window.GrabEnd ();
-Window.QuickDisableBorders();
-Window.ResizeLeftStart ();
-Window.ResizeLeftEnd ();
-Window.ResizeDownLeftStart ();
-Window.ResizeDownLeftEnd ();
-Window.ResizeDownStart ();
-Window.ResizeDownEnd ();
-Window.ResizeDownRightStart ();
-Window.ResizeDownRightEnd ();
-Window.ResizeRightStart ();
-Window.ResizeRightEnd ();
-Window.ResizeRightTopStart ();
-Window.ResizeRightTopEnd ();
-Window.ResizeTopStart ();
-Window.ResizeTopEnd ();
-Window.ResizeTopLeftStart ();
-Window.ResizeTopLeftEnd ();

Unity useful API:
-Screen.Width : int;
-Screen.Height : int;
-Screen.currentResolution : Vector2;
and many more...

Example Uses:
Create game launchers like the ones of top branded games (example: League of Legends or Steam !!) with no or custom borders.
Create games with awesome borders that make the difference in the user's desktop !!
Simulate Window movement or teleport the window dynamically without having the user do anything !!
Create popup/warning windows that can't be closed by the user and display information or other useful stuff.
Create invisible windows by having their width or height be 0 or even below 0.
Move your windows outside the screen or in places that the cursor usually cant go.
TOP: Have fullscreen windowed mode at full resolution without waiting for Unity's standard fullscreen buffering !!!
and many more, just use your imagination and creativity...

How to install the plugin:
The first thing you may want to do is use it , but you will have to make a few steps before beeing able to do so.
1.Open Unity and go to Edit -> Project Settings -> Player -> Other Settings -> Api Compatibility Level and set it to ".NET 2.0"
2.Drag the "Window" C# script located inside of Plugins folder and drop it on any form of gameobject inside your scene.
(2.1 Warning: Do not deactivate the script. Drop it once , having multiple "Window" scripts inside one scene is not supported.)
3.Do not change the location of the System.Windows.Forms file located inside the Plugins folder.
4.If you don't already know, if you change the location of "Window" C# script you wont be able to call any of the API above from any UnityScript !
5.For more accurate installation guide read the Installation_Guide.txt

How to correctly use it:
Note : This plugin is not meant to be used in the editor , most functions are protected (cant be used in the editor) to protect you from causing damage or annoying behavior. Also some of the read or "get" values will return wrong information in the editor.
---------------------------------------------------------------
"FullyAutoBorderless"
Once you have dropped the script into a gameobject then you will see a tickbox variable that says "Fully Auto Borderless"
If you have this variable enabled and you build your standalone , it will always force the borderless mode even if you try later to set it to bordered by code it will turn back to borderless !
This is good if you want the standalone to be borderless from the beginning to the end the only drawback is that it requires the client to restart once every time you decide to remove or add borders.
We can counter this behaviour by having a launcher scene (that is already included as an example).
---------------------------------------------------------------
"QuickAutoBorderless"
Once you have dropped the script into a gameobject then you will see a tickbox variable that says "Quick Auto Borderless"
This is a lightweight borderless mode that will not require a restart to activate with the drawnback that it can't be resized without making the borderss return while resizing..
If your project requires little to no window resizing or you are ok with your client to make this behaviour then this option is for you.
---------------------------------------------------------------
"AllowSizeResettingBeforeExit"
Once you have dropped the script into a gameobject then you will see a tickbox variable that says "Allow Size Resetting Before Exit"
This variable is create to make the window launch with a small size (116 x 90) and reduce problems while increasing performance.
It also recommended to edit player setting and set this resolution to the window.
(Read installation guide for more info)
---------------------------------------------------------------
-Window.Minimize ();
Minimizes the window as if you had clicked the minimize button.
---------------------------------------------------------------
-Window.Fullscreen ();
Sets the window into fullscreen mode , by preserving the current resolution.
(Works just like standard Unity fullscreen function)
---------------------------------------------------------------
-Window.Fullscreen (Vector2);
Same as above but allows you to set the quality as a Vector2
---------------------------------------------------------------
-Window.Fullscreen (int,int);
Same as above but allows you to set the quality as two integers instead of one Vector2
---------------------------------------------------------------
-Window.Maximize ();
Will Maximize the window at full speed and have the same results as if you had clicked the maximize button,
if you are running on borderless mode it will look like fullscreen mode but a lot faster :)
---------------------------------------------------------------
-Window.Maximize (boolean);
Same as above but if the boolean is set to false it will take into consideration the min/max width/height you have set and will result into a max size mode ;)
---------------------------------------------------------------
-Window.Exit ();
Similar to Unity's default quit function.
---------------------------------------------------------------
-Window.ForceExit ();
Will force window exit with a high priority and will cause the window to close very fast even if its not responding !! :)
---------------------------------------------------------------
-Window.IsDoneLoading();
Returns true if all calculatings of the window plugin are done at least once. Good for getting accurate info in the Start or Awake function.
---------------------------------------------------------------
-Window.IsBorderless ();
Returns true if the standalone is borderless and false if the window is bordered.
---------------------------------------------------------------
-Window.Border ();
Will make the window borderless if it has borders or will make the window bordered if its borderless.
(Warning , it will force the window to restart and thus lose all processes so be careful to save before calling that)
---------------------------------------------------------------
-Window.Border (boolean);
Will set borderless mode if set to false,
will set to bordered mode if set to true.
(Same warning as above)
---------------------------------------------------------------
-Window.SetMinWidth (int);
Will set the minimum width allowed to the window
(Some functions have the ability to ignore this)
---------------------------------------------------------------
-Window.SetMaxWidth (int);
Will set the maximum width allowed to the window
(Some functions have the ability to ignore this)
---------------------------------------------------------------
-Window.SetMinHeight (int);
Will set the minimum height allowed to the window
(Some functions have the ability to ignore this)
---------------------------------------------------------------
-Window.SetMaxHeight (int);
Will set the maximum height allowed to the window
(Some functions have the ability to ignore this)
---------------------------------------------------------------
-Window.GetMinWidth (int);
Returns the minimum width you have set through Window.SetMinWidth as an int
---------------------------------------------------------------
-Window.GetMaxWidth (int);
Returns the maximum width you have set through Window.SetMaxWidth as an int
---------------------------------------------------------------
-Window.GetMinHeight (int);
Returns the minimum height you have set through Window.SetMinHeight as an int
---------------------------------------------------------------
-Window.GetMaxHeight (int);
Returns the maximum height you have set through Window.SetMaxHeight as an int
---------------------------------------------------------------
-Window.SetRect (Rect);
Sets the window's position and size at the same time to the given Rect
---------------------------------------------------------------
-Window.SetRect (int,int,int,int);
Same as above but instead of a rect it gets 4 separate ints
---------------------------------------------------------------
-Window.SetPosition (int,int);
Sets the position of the window only to the given int values and preserves the width and height
(Height and Width will not work right in bordered mode)
---------------------------------------------------------------
-Window.SetPosition (Vector2);
Same as above but instead of two ints it takes one Vector2
---------------------------------------------------------------
-Window.SetSize (int,int);
Sets the window's Size to the given int values and preserves the location
---------------------------------------------------------------
-Window.SetSize (Vector2);
Same as above but instead of two ints it takes one Vector2
---------------------------------------------------------------
-Window.GetBorderRect ();
Returns the Border Position and Overall Size as a Rect
---------------------------------------------------------------
-Window.GetBorderPosition ();
Returns the Border Position as a Vector2
---------------------------------------------------------------
-Window.GetBorderSize ();
Returns the Border Width and Height as a Vector2
(Might not work right)
---------------------------------------------------------------
-Window.GetRect ();
Returns the Window Position and Overall Size as a Rect
---------------------------------------------------------------
-Window.GetPosition ();
Returns the Window Position as a Vector2
---------------------------------------------------------------
-Window.GetSize ();
Returns the Window Size as a Vector2
---------------------------------------------------------------
-Window.GrabStart ();
Once called the Window will be "grabbed" by the cursor and will keep following it while preserving its offset until Window.GrabEnd is called
(Always make sure you are able to call GrabEnd because once GrabStart is activated , you wont be able to click anywhere)
(Grab and other Resize functions cant be active at the same time)
---------------------------------------------------------------
-Window.GrabEnd ();
Will give an end to the active GrabStart function
---------------------------------------------------------------
-Window.QuickDisableBorders();
This function will disable the borders of the window using the latest "Quick" method.
You will probably not need to call it but so far it is only used in Unity5 after entering and exiting fullscreen mode to re-deactivate the borders if using QuickBorderless option.
---------------------------------------------------------------
-Window.ResizeLeftStart ();
Once called it will start changing the size of the window only from the left side according to the mouse position while preserving its offset.
(Its important to call the Window.ResizeLeftEnd function or else you wont be able to call any other grab or resize functions or click anywhere)
---------------------------------------------------------------
-Window.ResizeLeftEnd ();
Will stop resizing the window if the above function was called.
---------------------------------------------------------------
-Window.ResizeDownLeftStart ();
Once called it will start changing the size of the window only from the left and down side according to the mouse position while preserving its offset.
(Its important to call the Window.ResizeDownLeftEnd function or else you wont be able to call any other grab or resize functions or click anywhere)
---------------------------------------------------------------
-Window.ResizeDownLeftEnd ();
Will stop resizing the window if the above function was called.
---------------------------------------------------------------
-Window.ResizeDownStart ();
Once called it will start changing the size of the window only from the down side according to the mouse position while preserving its offset.
(Its important to call the Window.ResizeDownEnd function or else you wont be able to call any other grab or resize functions or click anywhere)
---------------------------------------------------------------
-Window.ResizeDownEnd ();
Will stop resizing the window if the above function was called.
---------------------------------------------------------------
-Window.ResizeDownRightStart ();
Once called it will start changing the size of the window only from the down and right side according to the mouse position while preserving its offset.
(Its important to call the Window.ResizeDownRightEnd function or else you wont be able to call any other grab or resize functions or click anywhere)
---------------------------------------------------------------
-Window.ResizeDownRightEnd ();
Will stop resizing the window if the above function was called.
---------------------------------------------------------------
-Window.ResizeRightStart ();
Once called it will start changing the size of the window only from the right side according to the mouse position while preserving its offset.
(Its important to call the Window.ResizeRightEnd function or else you wont be able to call any other grab or resize functions or click anywhere)
---------------------------------------------------------------
-Window.ResizeRightEnd ();
Will stop resizing the window if the above function was called.
---------------------------------------------------------------
-Window.ResizeRightTopStart ();
Once called it will start changing the size of the window only from the right and top side according to the mouse position while preserving its offset.
(Its important to call the Window.ResizeRightTopEnd function or else you wont be able to call any other grab or resize functions or click anywhere)
---------------------------------------------------------------
-Window.ResizeRightTopEnd ();
Will stop resizing the window if the above function was called.
---------------------------------------------------------------
-Window.ResizeTopStart ();
Once called it will start changing the size of the window only from the top side according to the mouse position while preserving its offset.
(Its important to call the Window.ResizeTopEnd function or else you wont be able to call any other grab or resize functions or click anywhere)
---------------------------------------------------------------
-Window.ResizeTopEnd ();
Will stop resizing the window if the above function was called.
---------------------------------------------------------------
-Window.ResizeTopLeftStart ();
Once called it will start changing the size of the window only from the top and left side according to the mouse position while preserving its offset.
(Its important to call the Window.ResizeTopLeftEnd function or else you wont be able to call any other grab or resize functions or click anywhere)
---------------------------------------------------------------
-Window.ResizeTopLeftEnd ();
Will stop resizing the window if the above function was called.
--------------------------------------------------------------
--------------------------------------------------------------
UNITY 5+ NOTES :
If using Unity 5.x the QuickBorderless Option will work way better , the only drawnback noticed is that after entering and exiting fullscreen mode, you will most likely need to call "QuickDisableBorders(); function after exiting fullscreen mode.
Therefore the Launcher Scene is not needed..

Conctact Info :
Email : DarknessBlade.Original@gmail.com
Youtube : https://www.youtube.com/DarknessBladeOrigin (We have TUTORIAL VIDEOS)

ASSET STORE 
VIDEO-1
VIDEO-2




[출처] https://forum.unity3d.com/threads/borderless-standalone-window-resizable-movable.298229/

Posted by blueasa

댓글을 달아 주세요