示例#1
0
        public static void DebugMonitorInfo()
        {
            int monitors = LibUniWinC.GetMonitorCount();

            int currentMonitorIndex = LibUniWinC.GetCurrentMonitor();

            string message = "Current monitor: " + currentMonitorIndex + "\r\n";

            for (int i = 0; i < monitors; i++)
            {
                float x, y, w, h;
                bool  result = LibUniWinC.GetMonitorRectangle(i, out x, out y, out w, out h);
                message += String.Format(
                    "Monitor {0}: X:{1}, Y:{2} - W:{3}, H:{4}\r\n",
                    i, x, y, w, h
                    );
            }
            Debug.Log(message);
        }
示例#2
0
 /// <summary>
 /// Get the monitor index where the window is located
 /// </summary>
 /// <returns>Monitor index</returns>
 public int GetCurrentMonitor()
 {
     return(LibUniWinC.GetCurrentMonitor());
 }