21 lines
680 B
C#
21 lines
680 B
C#
using System;
|
|
using UnityEditor;
|
|
|
|
namespace SuperTiled2Unity.Editor
|
|
{
|
|
public class SuperAssetDependencyPostprocessor : AssetPostprocessor
|
|
{
|
|
private static void OnPostprocessAllAssets(string[] importedAssets, string[] deletedAssets, string[] movedAssets, string[] movedFromAssetPaths)
|
|
{
|
|
// Refresh dependencies for our imported object
|
|
foreach (var assetPath in importedAssets)
|
|
{
|
|
if (assetPath.StartsWith("Assets/", StringComparison.OrdinalIgnoreCase))
|
|
{
|
|
TiledAssetDependencies.Instance.TrackDependencies(assetPath);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|