Singularity/Library/PackageCache/com.unity.visualscripting@1.../Editor/VisualScripting.State/Analytics/StateMacroSavedEvent.cs

22 lines
574 B
C#
Raw Permalink Normal View History

2024-05-06 14:45:45 -04:00
using UnityEditor;
namespace Unity.VisualScripting.Analytics
{
class StateMacroSavedEvent : UnityEditor.AssetModificationProcessor
{
static string[] OnWillSaveAssets(string[] paths)
{
foreach (string path in paths)
{
var assetType = AssetDatabase.GetMainAssetTypeAtPath(path);
if (assetType == typeof(StateGraphAsset))
{
UsageAnalytics.CollectAndSend();
break;
}
}
return paths;
}
}
}