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");
}
}
}