概要
using UnityEditor;
using UnityEngine;
[InitializeOnLoad]
public static class Example
{
static Example()
{
EditorApplication.projectWindowItemOnGUI += OnGUI;
}
private static void OnGUI( string guid, Rect selectionRect )
{
var path = AssetDatabase.GUIDToAssetPath( guid );
var clipboard = EditorGUIUtility.systemCopyBuffer;
var isContains = path.Contains( clipboard );
if ( !isContains ) return;
var pos = selectionRect;
pos.x = 0;
pos.xMax = selectionRect.xMax;
var color = GUI.color;
GUI.color = new Color( 10, 0, 0, 0.5f );
GUI.Box( pos, string.Empty );
GUI.color = color;
}
}