EditorUtility.DisplayDialogComplex()

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

显示复杂对话框

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

    [MenuItem("Test/DisplayDialogComplex")]
    public static void DisplayDialogComplex()
    {
        int option = EditorUtility.DisplayDialogComplex("title", "message", "ok", "cancel", "alt");
        Debug.Log("option=" + option);
        switch(option){
            case 0: break;
            case 1: break;
            case 2: break;
            default: Debug.LogError("Unrecognized option."); break;
        }
    }
}

 

效果

33333.png

 

标签: Unity3d

Powered by emlog  蜀ICP备18021003号-1   sitemap

川公网安备 51019002001593号