• Unity 自定义编辑窗体之ScriptableWizard


    当我们在编辑界面要批量设置游戏资源的时候,就需要从UnityEditor里面继承,实现自己的窗口类。

    所幸UNITY提供了最简单的一个自定义窗体类,我们直接往上扔public类型的属性就好,提供了确认和取消两种按钮。

    using UnityEngine;
    
    using System.Collections.Generic;
    
    using UnityEditor;
    
     
    
    public class Plugin_LoadingData : ScriptableWizard
    
    {
    
         
    
            [MenuItem ("GameObject/Data Setting/Loading text")]
    
            static void CreateWizard ()
    
            {
    
                DisplayWizard<Plugin_LoadingData> ("配置登陆提示文字", "确认", "取消");  
    
                
    
            }
    
     
    
            // This is called when the user clicks on the Create button.  
    
            void OnWizardCreate ()
    
            {  
    
                    Debug.Log ("确认");
    
            }  
    
        
    
            // Allows you to provide an action when the user clicks on the   
    
            // other button "Apply".  
    
            void OnWizardOtherButton ()
    
            {  
    
                    Debug.Log ("取消");
    
               
    
            }  
    
    }
  • 相关阅读:
    Tornado输出和响应头
    sqlalchemy 学习(二)scoped session
    04:sqlalchemy操作数据库 不错
    sqlalchemy(二)高级用法
    红黑树
    Minimum Window Substring
    Max Points on a Line
    分治算法
    Maximum Subarray
    Word Break
  • 原文地址:https://www.cnblogs.com/kimmy/p/3622113.html
Copyright © 2020-2023  润新知