Beispiel #1
0
        void StartNewSoloProcess(string BuildPath, QBProfile editorSettings, QBPlayerSettings PlayerSettings, int ProcessID)
        {
            QBProcess process = new QBProcess(BuildPath, editorSettings, PlayerSettings, ProcessID);

            process.OnProcessCompleted += HandleProcessCompleted;;
            _processes.Add(process);
            process.Start();
        }
Beispiel #2
0
        private void MoveProcessWindowIfRequired(Process process)
        {
            if (process.MainWindowHandle.ToInt32() == 0)
            {
                return;
            }

            QBInstanceData instanceData = _profile.GetInstanceData(_instanceID);

            if (instanceData != null && instanceData.screenPosition.Override)
            {
#if UNITY_EDITOR_WIN
                int width, height;
                _profile.GetScreenSizeForInstance(_instanceID, out width, out height);
                IntPtr id = GetForegroundWindow();

                UnityEngine.Debug.LogFormat("Move window [{0}, {1}, {2}, {3}]", instanceData.screenPosition.X, instanceData.screenPosition.Y, width, height);
//				bool repaint = true;
//              QBProcess.MoveWindow(
//                  id,
//                  instanceData.screenPosition.X, instanceData.screenPosition.Y,
//                  width, height,
//                  repaint
//                  );

                bool result = QBProcess.SetWindowPos(
                    id,
                    instanceData.screenPosition.X, instanceData.screenPosition.Y,
                    width, height,
                    0x0010 | 0x0200 | 0x0001 | 0x0004
                    );

                UnityEngine.Debug.LogFormat("Move success : {0}", result);
                if (!result)
                {
                    int errorCode = Marshal.GetLastWin32Error();
                    UnityEngine.Debug.LogFormat("Error code : {0}", errorCode);
                }
#endif
            }
        }
Beispiel #3
0
 void HandleProcessCompleted(QBProcess Process)
 {
     _processes.Remove(Process);
 }