Files
YachtDice/Assets/Plugins/AllIn1SpriteShader/Scripts/Editor/AllIn1ShaderAssetPostProcessor.cs
T
2026-02-23 22:01:07 +07:00

26 lines
629 B
C#

#if UNITY_EDITOR
using UnityEditor;
namespace AllIn1SpriteShader
{
public class AllIn1ShaderAssetPostProcessor : AssetPostprocessor
{
static void OnPostprocessAllAssets(string[] importedAssets, string[] deletedAssets, string[] movedAssets, string[] movedFromAssetPaths, bool didDomainReload)
{
bool needToRefreshConfig = false;
for (int i = 0; i < importedAssets.Length; i++)
{
if (importedAssets[i].EndsWith(Constants.MAIN_ASSEMBLY_NAME))
{
needToRefreshConfig = needToRefreshConfig || true;
}
}
if (needToRefreshConfig)
{
AllIn1ShaderImporter.ForceReimport();
}
}
}
}
#endif