Unity打开外部文件 exe

来源:互联网 发布:海淘软件 编辑:程序博客网 时间:2024/05/18 03:49
        using UnityEngine;
02using System.Collections;
03using System.Diagnostics;//用于 允许使用(Process) //
04 
05public class example : MonoBehaviour {
06 
07    public Rect windowRect = new Rect(20, 20, 120, 50);
08    void OnGUI() {
09 
10        if (GUI.Button(new Rect(10, 20, 100, 20), "QQ"))
11            <font color="#f00000">// 直接打开外部文件QQ等 exe</font>
12            Process.Start("C:\\Program Files (x86)\\Tencent\\QQ\\Bin\\QQ.exe");
13 
14    }
15 
16}

0 0
原创粉丝点击