- Home /
Detecting the number of displays
I'm trying to detect the number of displays/monitors attached to a user's machine and I'm curious as to whether there's something built into the Unity API (I'm using 3.5.1) that will allow me to do this natively or if I'll have to rely on some external solution (like a C++ DLL). The purpose of this is to decide whether to start my game in fullscreen (displays == 1) or in windowed mode (displays > 1) as starting a game in fullscreen mode with more than 1 displays renders any other displays unusable. I'd appreciate any insight that anyone can offer. Thanks.
ya really a good question, now even i want to knw the answer @_@
there is a page somewhere in the Unity Docs like "system info". It will tell you stuff like how much ram is in the user's machine, what sort of chair she is using, etc. But I can never find that damn page.
This is the SystemInfo page: http://unity3d.com/support/documentation/ScriptReference/SystemInfo.html
Unfortunately, there doesn't seem to be anything about displays/monitors there.
that link also not working. is it for a local file? anyway looks the same as Josh4's link =]
Answer by Scribe · May 30, 2012 at 05:22 PM
Hi, I don't know how you would do this however I have found a few things, firstly the systeminfo page I think Fattie is talking about can be found here but I don't understand what any of it is about XD. Secondly in the Player Settings panel (Edit->Project Settings->Player) under Standalone->Resolution And Presentation there is a check box called 'Capture Single Screen' which apparently does this: If enabled, standalone games in fullscreen mode will not darken the secondary monitor in multi-monitor setups.
So hopefully one of those things might lead you towards an answer, good luck
Scribe
Your answer