Search Unity

How to se the standalone player Window style on Windows

Discussion in 'Scripting' started by alfarmer, Jan 6, 2014.

  1. alfarmer

    alfarmer

    Joined:
    Nov 16, 2012
    Posts:
    27
    I need to dynamically switch between bordered borderless window mode at runtime. I've tried using P/Invoke on SetWindowLong() but it has no effect. How does one accomplish this?

    Note: It's a Windows-only app.

    Thx,
    ALF
     
  2. alfarmer

    alfarmer

    Joined:
    Nov 16, 2012
    Posts:
    27
    Based on my testing it now appears almost certain that Unity's Windows Standalone Player is SUPPRESSING attempts to change the window style at runtime. Thus the ONLY way to change window style is to relaunch your app with " -popupwindow" toggled on the command line. Why have that restriction?

    So now the next question would be -- how do I make "-popupwindow" the default behavior for my app so that's what happens when you launch the .exe (rather than having to manually create a special shortcut)?
     
    Last edited: Jan 6, 2014
  3. MDragon

    MDragon

    Joined:
    Dec 26, 2013
    Posts:
    329
    By the way, if you don't get responses in the end, you may try to post this in the "Unity Support" forum, where there may be a higher chance for there to be more people with appropriate experience.
     
  4. Meltdown

    Meltdown

    Joined:
    Oct 13, 2010
    Posts:
    5,822
  5. alfarmer

    alfarmer

    Joined:
    Nov 16, 2012
    Posts:
    27
    Thanks, I posted there as well.

    And nope, I don't mean between windowed full-screen. I need to always run in windowed mode, but sometimes that window has to have a title bar and other times it cannot have one.