鸟语天空
EditorUtility.DisplayDialogComplex()
post by:追风剑情 2016-10-31 16:00

显示复杂对话框

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

 

评论:
发表评论:
昵称

邮件地址 (选填)

个人主页 (选填)

内容