Unity3D使用System.Windows.Forms.dll

来源:互联网 发布:产品宣传册制作软件 编辑:程序博客网 时间:2024/05/05 23:33


using UnityEngine;using System.Collections;using System.Windows.Forms;public class Test : MonoBehaviour{    // Use this for initialization    void Start()    {    }    // Update is called once per frame    void Update()    {    }    void OnGUI()    {        if (GUI.Button(new Rect(0, 0, 100, 20), "Button"))        {            MessageBoxYesCancel("yes");        }    }    public static DialogResult MessageBoxYesCancel(string Information)//通用弹出式信息显示对话框方法(进行互操作)返回黄色感汉号    {        string caption = "【系统提示】";        MessageBoxButtons buttons = MessageBoxButtons.YesNoCancel;        return MessageBox.Show(Information, caption, buttons, MessageBoxIcon.Question);    }    }


playersettings optimization api compatibility level .NET 2.0

需要添加引用System.Deployment

下载所需的两个dll

原创粉丝点击