Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by JDss · Jan 14, 2014 at 03:47 PM · windows-8

Window is minimizing when I click other screen in dual monitor.

Is it possible to do some tasks during in full screen unity app? I mean like below

Screen1: running unity's some app.exe in fullscreen Screen2: do something, ie. web browsing, seeing log and so on.

I could launch app in fullscreen, but when I do something on Screen2, Screen1's app switch to min window mode. So in unity's current specification, it's impossible to do something in other window?

environment

  • Unity pro 4.3.2f1

  • Win 8

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by Kolodej · Jan 14, 2014 at 04:08 PM

Hi, the answer is no. But you can start your app in window mode, without border, set the position and resolution to fit the target monitor (enable run in background player property). I have used this many times.

You can do this via Windows Native Methods, you can send messages to window handle to set position, size and other properties. See code below.

Note: I am using external (controller) application to do this.

             /// <summary>
             /// Changes the size, position, and Z order of a child, pop-up, or top-level window. These windows
             /// are ordered according to their appearance on the screen.
             /// The topmost window receives the highest rank and is the first window in the Z order.
             /// </summary>
             /// <param name="hWnd">A handle to the window.</param>
             /// <param name="handle">A handle to the window to precede the positioned window in the Z order.</param>
             /// <param name="x">The new position of the left side of the window, in client coordinates.</param>
             /// <param name="y">The new position of the top of the window, in client coordinates.</param>
             /// <param name="cx">The new width of the window, in pixels.</param>
             /// <param name="cy">The new height of the window, in pixels.</param>
             /// <param name="flags">The window sizing and positioning flags.</param>
             /// <returns>
             /// If the function succeeds, the return value is nonzero.
             /// If the function fails, the return value is zero. To get extended error information, call GetLastError.
             /// </returns>
             public static bool SetWindowPos(IntPtr hWnd, SetWindowPosHandle handle, int x, int y, int cx, int cy, SetWindowPosFlag flags) {
                 return SetWindowPos(hWnd, handle.Handle, x, y, cx, cy, (uint)flags);
             }
     
             [DllImport("user32.dll")]
             [return: MarshalAs(UnmanagedType.Bool)]
             private static extern bool SetWindowPos(IntPtr hWnd, IntPtr hWndInsertAfter, int X, int Y, int cx, int cy, uint uFlags);
     
 
Comment
Add comment · Show 3 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image JDss · Jan 15, 2014 at 04:06 AM 0
Share

Hi $$anonymous$$oldej, Oh, I see.. But why does the performance go down? Does Unity app switch graphical mode when changing to fullscreen? Am i right?

avatar image Kolodej · Jan 15, 2014 at 11:43 AM 0
Share

Hi, when is the app in fullscreen mode, then the graphic card is dedicated only to the app. When you are in window mode, then the others windows/apps are rendered => graphical context switching. The performance goes down, its true, but it is not so serious, if your app is not ultra modern hi tech, you can have still 60FPS :) Everything depends on what do you wan to do and why.

avatar image jpcoder · Jan 20, 2014 at 02:28 AM 0
Share

I am having this same problem. I had already looked at the option of using a borderless window and I think that would work but I don't know how to size and place the window. How can I move the window to the second monitor and resize it to the monitor's current resolution programmatically?

Thanks...

Your answer

Hint: You can notify a user about this post by typing @username

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

Answers Answers and Comments

20 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Conditional compilation for Windows 8? 1 Answer

Continuing problems with windows 8.1 0 Answers

Upgrade from Windows 8 to 8.1 killed my Unity editor 1 Answer

File access in Windows 8? 2 Answers

TouchScript not working properly in Windows 8? 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges