Unity开启外部EXE
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.Runtime.InteropServices;
using System.Threading.Tasks;
using UnityEditor;
using UnityEngine;
public class Unity_OpenExe : MonoBehaviour
{
public string[] WebCamList;
public List<Process> CamProcessList = new List<Process>();
//使用查找任务栏
[DllImport("user32.dll")]
static extern IntPtr FindWindow(string strClassName, int nptWindowName);
//当前窗口
[DllImport("user32.dll")] static extern IntPtr GetForegroundWindow();
//获取窗口位置以及大小
[DllImport("user32.dll")] static extern bool GetWindowRect(IntPtr hWnd, ref RECT lpRect);