Unity 场景资源快捷选择依赖

作者: 2b75747cf703 | 来源:发表于2016-03-02 10:46 被阅读167次
    using UnityEngine;
    using UnityEditor;
    
    [CanEditMultipleObjects]
    [CustomEditor(typeof(SceneAsset))]
    public class SceneAssetEditor : Editor
    {
        public override void OnInspectorGUI()
        {
            GUI.enabled = true;
    
            base.OnInspectorGUI();
    
            if (GUILayout.Button("选择依赖"))
            {
                EditorApplication.ExecuteMenuItem("Assets/Select Dependencies");
            }
        }
    }
    

    相关文章

      网友评论

        本文标题:Unity 场景资源快捷选择依赖

        本文链接:https://www.haomeiwen.com/subject/ridnkttx.html