EditorUtility.DisplayDialog()

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

显示一个模态对话框

  1. using UnityEngine;
  2. using UnityEditor;
  3. using System.Collections;
  4. /// <summary>
  5. /// 编辑器工具
  6. /// </summary>
  7. public class EditorUtilityTest {
  8.  
  9. [MenuItem("Test/DisplayDialog")]
  10. public static void DisplayDialog()
  11. {
  12. bool ok = EditorUtility.DisplayDialog("title", "message", "ok", "cancel");
  13. Debug.Log("ok="+ok);
  14. }
  15. }

 

效果

222222.png

 

标签: Unity3d

Powered by emlog  蜀ICP备18021003号-1   sitemap

川公网安备 51019002001593号