- Home /
if you close the laptop, if you close the laptop
I decided to run the build on the laptop and put it behind my back. This laptop I control on team viwer. with the purpose of broadcasting video on TV. but as soon as I close the laptop, the video stream stops, the glasses are fine. I still can control the laptop and watch videos from YouTube, but the video stream of the game is no longer transmitted. What a component of Unity is responsible for this.
Answer by Legend_Bacon · Nov 15, 2018 at 02:30 PM
Hello there,
In Windows 10 you actually have an option to choose what "closing the lid" of the laptop does.
Follow these instructions:
• Click Start button and open the Control Panel.
• Select System and Security.
• Click Power Options.
• Click "Choose what closing the lid does" from the left column.
• In the "When I close the lid field", select "Do nothing" in the On battery and/or Plugged in columns.
• Click Save Changes to finish.
Give that a try, it seems to work for me. But as mentioned above, you need to build with the "Run in background" option enabled.
Hope that helps!
Cheers,
~LegendBacon
Answer by NorthStar79 · Nov 15, 2018 at 12:51 PM
be sure that you checked "Run in background" option at player settings.
Answer by Bunny83 · Nov 15, 2018 at 01:38 PM
if you close the laptop .... you can never know what is happening since it depends entirely on the OS and the settings what should happen. Some laptops just disable the screen, some go in hibernate / sleep mode, some will shutdown the OS, some will do nothing and others may even cut the powersupply for the GPU to save power.
I suspect that in your case depending on how the video stream was transmitted the reason is most likely the destruction of the rendering context by the OS. There is lttle you can do from the Unity side. If you just mirrored the desktop onto the TV that might be the main issue. The TV should be a seperate monitor and you should run your Unity application explicitly on that monitor. However that doesn't guarantee that it's working as it depends on the actions that the OS performs. Usually closing the lid means you're no longer working with the device. At least that's what more OS assume.