概要
using UnityEditor;
using UnityEditor.PackageManager;
using UnityEngine;
[InitializeOnLoad]
public static class Example
{
static Example()
{
void Handle( PackageRegistrationEventArgs args )
{
foreach ( var info in args.added )
{
Debug.Log( info.assetPath );
}
foreach ( var info in args.changedFrom )
{
Debug.Log( info.assetPath );
}
foreach ( var info in args.changedTo )
{
Debug.Log( info.assetPath );
}
foreach ( var info in args.removed )
{
Debug.Log( info.assetPath );
}
}
Events.registeringPackages += Handle;
Events.registeredPackages += Handle;
}
}