using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Text;
using UnityEngine;
public class M_ProcessExcuter :MonoBehaviour
{
public void Start()
{
}
void Awake()
{
Process p = new Process();//设定调用的程序名,不是系统目录的需要完整路径
p.StartInfo.FileName = Application.streamingAssetsPath + "/LavFilter/LAVFilter.bat";//传入执行参数
p.StartInfo.Arguments = "";
p.StartInfo.UseShellExecute = false;//是否使用操作系统shell启动
p.StartInfo.RedirectStandardInput = true;//接受来自调用程序的输入信息
p.StartInfo.RedirectStandardOutput = true;//由调用程序获取输出信息
p.StartInfo.RedirectStandardError = true;//重定向标准错误输出
p.StartInfo.CreateNoWindow = true;//不显示程序窗口
p.Start();
p.WaitForExit();
p.Close();
}
}
- 本文固定链接: http://www.nihao6.cn/archives/473
- 转载请注明: 虚拟世界 于 Unity3D虚拟世界 发表
捐 赠如果您愿意花10块钱请我喝一杯咖啡的话,请用手机扫描二维码即可通过支付宝或者微信直接向我捐款,在此非常感谢您对虚拟世界的捐赠。