Search Unity

Borderless Standalone Window (Resizable + Movable)

Discussion in 'Assets and Asset Store' started by NightmarexGR, Feb 15, 2015.

  1. NightmarexGR

    NightmarexGR

    Joined:
    Jun 7, 2012
    Posts:
    217
    A customer pointed out a critical bug in the new version so i will delay the update a bit. It was harder to solve than i thought :/
     
  2. sonofbryce

    sonofbryce

    Joined:
    May 19, 2009
    Posts:
    111
    Nice work. With a borderless window, can you also drag to resize? Also does clicking and dragging drag the window no matter where you'd click or can you define areas that are draggable.

    I was looking for something to make it so that a user can't resize smaller than a certain size, say 640x480. Can this prevent resizing the window to a tiny size?

    Thanks!
     
  3. NightmarexGR

    NightmarexGR

    Joined:
    Jun 7, 2012
    Posts:
    217
    Yes , you can drag to resize , define areas to drag , you can se miniumum window limit. The package comes with an example of all this.
    As for the update , It will take me a week more till it's ready , i have to export for all unity versions for more compatability :p
     
    sonofbryce likes this.
  4. TheADrain

    TheADrain

    Joined:
    Nov 16, 2016
    Posts:
    48
    Hi NightmarexGR,

    I'm using QuickDisableBorders() to remove the window borders, and that works ok but I'm struggling to get the borders back without restarting the application. Window.Border(true) restarts the application every time.

    Is there a way to do this without the restart? I'm using Unity 5.5.03f and I'm testing on Windows 7.

    Resizing the window in the test application sometimes seems to cause the window and mouse pointer location to become distorted, but that's not really an issue for me as I only need to be able to smoothly enable and disable borderless windowed mode, I don't need dynamic re-sizing.
     
  5. NightmarexGR

    NightmarexGR

    Joined:
    Jun 7, 2012
    Posts:
    217
    Yes there is a fix for that, contact me via email to send you the fixed version. I still haven't uploaded it in the asset store.
    My email : DarknessBlade.original@gmail.com
     
  6. TheADrain

    TheADrain

    Joined:
    Nov 16, 2016
    Posts:
    48
    Ah sweet thanks, much appreciated.
     
  7. jGate99

    jGate99

    Joined:
    Oct 22, 2013
    Posts:
    1,945
    @NightmarexGR,

    Can you please provide methods to change Window Title and Icon on runtime (so it appears in taskbar) as well as highlight task bar just like skype where icon changes if new message and it task bar highlights to show that there is a new message.
     
  8. NightmarexGR

    NightmarexGR

    Joined:
    Jun 7, 2012
    Posts:
    217
    Changing the name is possible , as for the notification think like skype has. I would love to make this work but i am not exacly sure if it will work. I am on vacation right now and i will be back at 28/2/2017. If anyone is in rush, i am very sorry.
    I still haven't uploaded the new version in the asset store because there is major issue with transparency. (Not shader transparency , window trancparency and optional clickthough ;) )
     
  9. NightmarexGR

    NightmarexGR

    Joined:
    Jun 7, 2012
    Posts:
    217
    I still haven't got an email from you.
    Tomorrow i will upload the new package for review.
    I am working on the window runtime title change. Very close to making it work. I also think i got a solution for the notification blink. Will be posting more tomorrow.
     
  10. jGate99

    jGate99

    Joined:
    Oct 22, 2013
    Posts:
    1,945
    Thanks, and what about icon change on runtime (like skype show new chat message) in icon
     
  11. NightmarexGR

    NightmarexGR

    Joined:
    Jun 7, 2012
    Posts:
    217
    For some urgent health reasons i need to fly to athens sorry once again will be back asap. I hope all go ok (not for me , a family person)
     
  12. NightmarexGR

    NightmarexGR

    Joined:
    Jun 7, 2012
    Posts:
    217
    Ok this is funny , i just realized i forgot to hit the submit button in the assetstore -_-
    I came to update the documentation and just realized that. Sorry for the wait guys , i just hit it now.

    -------------------------------------------------
    Update Notes:

    New Price $$
    All known bugs fixed.

    All functions are now editor protected and will not cause trouble.
    ~A "SilenceWarnings" boolean to silence any warning that keep your editor safe.
    ~A "AutoFixAfterResizing" boolean that will make the window borderless after resizing if its not already.
    ~A "Limitations" private vector 4 , that limits the window not to move beyong or below certain values.
    -Window.FlashEnd();
    -Window.FlashPause();
    -Window.FlashStart();
    -Window.FlashUntilFocus();
    -Window.GetTitle();
    -Window.SetTitle(string);
    -Window.QuickDisableBorders();
    -Window.QuickEnableBorders();

    All resize functions now support Aspect ratios

    As you saw from the new api , you can add flash notifications to the taskbar and/or border and change the window title in runtime !!
     
  13. PendingFox

    PendingFox

    Joined:
    Jan 15, 2017
    Posts:
    42
    Still no news for Mac? )
    I still don't get why would someone use this on windows only(on a professional level) mac is 45% of the marketshare now lol.

    We need multiplatform stuff

    (if anyone's wondering, it's doable via native plugin, pretty easy with a similar API to windows... NSWindow.StyleMask -> Borderless )
     
    Last edited: Jul 26, 2017
  14. NightmarexGR

    NightmarexGR

    Joined:
    Jun 7, 2012
    Posts:
    217
    Thank you for the info, well i haven't added mac support because i dont own a mac and i can't test what i build.
    I guess i will have to go with a virtual machine.. I will be back with info about this next week.
     
  15. PendingFox

    PendingFox

    Joined:
    Jan 15, 2017
    Posts:
    42
    ^
    Awesome, let me know how it goes, I'm a mac dev, I could help you out with testing and debugging the mac native bundle.
    Cuz getting it done would really boost it to the next level(imagine doing borderless splash screens or even game launchers for both Mac and Win)

    Keep up the good work.
     
  16. nahoy

    nahoy

    Joined:
    Dec 10, 2012
    Posts:
    21
    Hello!

    How do you handle the minimum size of the window?
    Are you calling Windows native APIs to do that?

    Also, is this working on OS X?

    Thanks!

    PS: I'm only interested on the min size :)
     
    NightmarexGR likes this.
  17. NightmarexGR

    NightmarexGR

    Joined:
    Jun 7, 2012
    Posts:
    217
    Hello, i am not doing good with the OS X and mac :/
    As for minimum size yes, if the window is borderless you can set minimum size to whatever you want !!!
    If it has borders i think the minimum minimum is 128x78 you can set anything above this but to set anything less will be tricky because of the borders.
     
  18. AlanMattano

    AlanMattano

    Joined:
    Aug 22, 2013
    Posts:
    1,501
    This package has been deprecated from the Asset Store
     
    Last edited: Feb 28, 2018
  19. NightmarexGR

    NightmarexGR

    Joined:
    Jun 7, 2012
    Posts:
    217
    I am trying to get the asset store team to reupload the new versions of my assets. Still waiting their responce..
     
    AlanMattano likes this.
  20. RoyalCoder

    RoyalCoder

    Joined:
    Oct 4, 2013
    Posts:
    301
    Hi @NightmarexGR ,

    Any news about Borderless Standalone Window, I want to purchase this asset. Thanks!
     
  21. NightmarexGR

    NightmarexGR

    Joined:
    Jun 7, 2012
    Posts:
    217
    Well it seems asset store has some new rules, and it takes quite some time to get the asset accepted. I will try again in a few days because i was busy myself. I was also working on linux support ect. So far so good, i will upload and wait the asset to get accepted.
     
    RoyalCoder likes this.
  22. NightmarexGR

    NightmarexGR

    Joined:
    Jun 7, 2012
    Posts:
    217
    -New version accepted by store.
    -Edited main post with the new API.

    Also preparing the transparency plugin as a separate upgrade !!
     
    zyzyx likes this.
  23. JeffRBake

    JeffRBake

    Joined:
    Oct 5, 2012
    Posts:
    12
    This is not cross platform? IE windows, max, linux?
     
  24. NightmarexGR

    NightmarexGR

    Joined:
    Jun 7, 2012
    Posts:
    217
    No, this is only Windows OS
     
  25. spootymilk

    spootymilk

    Joined:
    Jun 9, 2017
    Posts:
    18
    Hi, can i use your asset to have a double screen view windowed ?
     
  26. NightmarexGR

    NightmarexGR

    Joined:
    Jun 7, 2012
    Posts:
    217
    Do you mean to have the build in windowed fullscreen in 2 monitors ?
    I got confused by your answer please explain .
     
  27. popMark

    popMark

    Joined:
    Apr 14, 2013
    Posts:
    114
    Can I use this asset to have a bordered, non fullscreen window on display 1 and a fullscreen borderless window on display 2?
     
  28. NightmarexGR

    NightmarexGR

    Joined:
    Jun 7, 2012
    Posts:
    217
    If you mean you have 2 different applications running then you can deferentially do that.
    If you mean you have the same application you can do that aswell but you will need to code a bit (i can do this for you)

    If you have more questions please ask
     
  29. popMark

    popMark

    Joined:
    Apr 14, 2013
    Posts:
    114
    @NightmarexGR I got it working via the normal displays[1].Activate() and then calling Window.SetRect()
    This results in display[1] being fullscreen because Unity seems to force fullscreen for all displays when you activate a second display, and then SetRect puts the display[0] back into a window. The negative effect is that the display[0] window is borderless and no amount of EnableBorders() seems to turn it on, but I dont mind it much, I added a UGUI frame with calls to ResizeLeft/Right etc and it works great

    Would you have done anything differently?
     
  30. NightmarexGR

    NightmarexGR

    Joined:
    Jun 7, 2012
    Posts:
    217
    No no no, don't call displays.Activate(), it is very buggy.
    in the demo scene 2 in my plugin you can see how i do it:
    in page 3 you can enable/disable borders and in every page there is a "Maximize" button on the top, if you press maximize on monitor 1 then maximize will be applied in monitor 1 preserving borders or not, same goes on monitor 0 ect.

    You didn't answer you want this on 2 seperate applications/windows or it is for the same window ?
    I can provide you with code to do this automatically.
     
  31. popMark

    popMark

    Joined:
    Apr 14, 2013
    Posts:
    114
    Thanks @NightmarexGR, Its 1 application with 2 cameras and 2 windows.

    From demo 3 I cant see how to just maximize the window on display 2
     
  32. NightmarexGR

    NightmarexGR

    Joined:
    Jun 7, 2012
    Posts:
    217
    How can it be 1 application with 2 windows ? I didn't know unity supported that.
    i did a quick search and found out this https://docs.unity3d.com/Manual/MultiDisplay.html, is this what you are doing ?
    If yes i will make a search and try to build something similar with you to resolve the issue if possible.
     
  33. popMark

    popMark

    Joined:
    Apr 14, 2013
    Posts:
    114
    @NightmarexGR yes that's exactly what I'm doing, any help is much appreciated
     
  34. NightmarexGR

    NightmarexGR

    Joined:
    Jun 7, 2012
    Posts:
    217
    Ok the goal is clear now, i will try to make it work in about 24 hours from now.

    Thanks for your patience.
     
  35. NightmarexGR

    NightmarexGR

    Joined:
    Jun 7, 2012
    Posts:
    217
    Unity team really did not want you to do this, as i dig deep down i found out about this multi display feature and found out it is an experimental thing, does not work well and is very buggy a lot of times.
    LUCKILY i had build a similar system from scatch a long time ago, and luckily i had implimented a part of it inside this asset. All you need to do is get the window ID of the second window you activate with Display.displays[1].Activate(); and the get it's ID with my Window.GetCurrentActive() this will either return the ID of your main window or the ID of your secondary window if you have clicked it last. Then all my functions Already support an optional parameter "windowId" for example i just did :
    Code (CSharp):
    1.  
    2. Window.QuickEnableBorders( // ID of secondary window here// );
    and it enabled it's borders, but the resolution& refresh rate is hardcoded but i think i can fix that ;)

    Look image below, I tested with 2 monitors , enabling borders , setting position ect. it works but needs a little work.
    Send me an email at DarknessBlade.original@gmail.com and i will chat with you about the details
     

    Attached Files:

  36. Gaoyu2020

    Gaoyu2020

    Joined:
    Aug 25, 2014
    Posts:
    19
    Is support unity2019.2?
     
  37. NightmarexGR

    NightmarexGR

    Joined:
    Jun 7, 2012
    Posts:
    217
    Multiple windows, fullscreen and window flashing doesnt work properly (sometimes).

    The rest of the functions do work as expected. (resize, borderless, move, hide, close ect.)
     
  38. NicBischoff

    NicBischoff

    Joined:
    Mar 19, 2014
    Posts:
    204
    I have two questions. Please upload a demo. The old demo is buggy and crashes on Windows 10. Please can you do some kind of discount on this for black Friday, 150 is way to high - sub 100 is an instant buy for me. Thanks.
     
  39. NightmarexGR

    NightmarexGR

    Joined:
    Jun 7, 2012
    Posts:
    217
    Hello NicBschoff, price for black friday will be ~90, beware tho features that do not work with the newer unity versions will be temporary removed (Multiple windows, fullscreen and window flashing) but don't worry they will be back when fixed.
     
  40. NightmarexGR

    NightmarexGR

    Joined:
    Jun 7, 2012
    Posts:
    217
    Price reduced temporarily to 90$ (as a sale), get it while its there :D
     
  41. Gaoyu2020

    Gaoyu2020

    Joined:
    Aug 25, 2014
    Posts:
    19
    2019.3 support?
     
  42. NightmarexGR

    NightmarexGR

    Joined:
    Jun 7, 2012
    Posts:
    217
    Multiple windows, fullscreen and window flashing don't work
     
  43. Gaoyu2020

    Gaoyu2020

    Joined:
    Aug 25, 2014
    Posts:
    19
    Window.SetPosition is OK ?
    I load user32.dll failure in 2019.3.
     
  44. NightmarexGR

    NightmarexGR

    Joined:
    Jun 7, 2012
    Posts:
    217
    Window.SetPosition is ok yes, what do you mean user32.dll ?
    my plugin doesn't use user32.dll
     
  45. bdavis1000

    bdavis1000

    Joined:
    Oct 4, 2013
    Posts:
    18
    This is great! Just picked it up because I found out Unity's built in window management and fullscreen mode API don't actually work, at least on latest 2018 LTS. this gets around all of the problems on windows!

    I was wondering if there is an eta on something like this for OSX? I don't really need the window to be manually resizeable or anything, just being able to set the size, position, and windowed / borderless fullscreen / exclusive fullscreen would be enough.
     
  46. NightmarexGR

    NightmarexGR

    Joined:
    Jun 7, 2012
    Posts:
    217
    Sadly OSX support is not planned at all, at least until i get a mac for myself to test things out i can't add such a feature.
    Glad you are satisfied, feel free to leave a feedback ^_^
     
  47. NightmarexGR

    NightmarexGR

    Joined:
    Jun 7, 2012
    Posts:
    217
    Greetings everyone, as mentioned before the plugin had maximize compatability issues with unity 2018 and above, well i fixed this and also i can confirm it works with .NET 4.0 but these features might break again so wait for the new release in the asset store.
     
  48. Wilbert-Blom

    Wilbert-Blom

    Joined:
    Aug 13, 2011
    Posts:
    111
    Does multiple windows work with the new version?
    When can we expect it in the store ?
     
  49. NightmarexGR

    NightmarexGR

    Joined:
    Jun 7, 2012
    Posts:
    217
    By the end of this week it should be up,
    I was also working on the Lite version and i have to test in multiple systems with multiple conditions to make sure it is stable and works in all windows versions.

    As for multiple windows.. there are many cases here:
    1 big unity window across multiple screens - yes
    many unity windows across multiple screen - works but resolution is fixed... (also is bound to monitor count but you can toggle borderless on/off fine)
    1 unity main window and many different unity .exes that the main controls - yes (but you will have to sync your data somehow)
    I will dig deeper on this in the next update.
     
  50. NightmarexGR

    NightmarexGR

    Joined:
    Jun 7, 2012
    Posts:
    217
    The updated will be postponed again due to some real-life problems i have :/