EditorUtility.DisplayDialogComplex()

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

显示复杂对话框

  1. using UnityEngine;
  2. using UnityEditor;
  3. /// <summary>
  4. /// 编辑器工具
  5. /// </summary>
  6. public class EditorUtilityTest {
  7.  
  8. [MenuItem("Test/DisplayDialogComplex")]
  9. public static void DisplayDialogComplex()
  10. {
  11. int option = EditorUtility.DisplayDialogComplex("title", "message", "ok", "cancel", "alt");
  12. Debug.Log("option=" + option);
  13. switch(option){
  14. case 0: break;
  15. case 1: break;
  16. case 2: break;
  17. default: Debug.LogError("Unrecognized option."); break;
  18. }
  19. }
  20. }

 

效果

33333.png

 

标签: Unity3d

Powered by emlog  蜀ICP备18021003号-1   sitemap

川公网安备 51019002001593号