Unity深入讲解Unity技术分享U3D技术采集

Unity 场景资源快捷选择依赖

2016-03-02  本文已影响167人  2b75747cf703
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");
        }
    }
}
上一篇下一篇

猜你喜欢

热点阅读