EditorUtility.DisplayDialog()

作者:追风剑情 发布于:2016-10-31 15:50 分类:Unity3d

显示一个模态对话框

using UnityEngine;
using UnityEditor;
using System.Collections;
/// <summary>
/// 编辑器工具
/// </summary>
public class EditorUtilityTest {

    [MenuItem("Test/DisplayDialog")]
    public static void DisplayDialog()
    {
        bool ok = EditorUtility.DisplayDialog("title", "message", "ok", "cancel");
        Debug.Log("ok="+ok);
    }
}

 

效果

222222.png

 

标签: Unity3d

Powered by emlog  蜀ICP备18021003号-1   sitemap

川公网安备 51019002001593号