Skip to content

Commit 7b453d7

Browse files
authored
Merge pull request #3 from destructive-crab/main
v2.0
2 parents ebda26b + aefeefb commit 7b453d7

16 files changed

+504
-171
lines changed

Editor.meta

Lines changed: 0 additions & 8 deletions
This file was deleted.

Editor/SceneSwitcher.meta

Lines changed: 0 additions & 8 deletions
This file was deleted.
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
using System;
2+
using UnityEditor;
3+
4+
namespace RimuruDevUtils.SceneSwitcher
5+
{
6+
public class AssetChangeListener : AssetPostprocessor
7+
{
8+
public static event Action AssetsWereChanged;
9+
10+
private static void OnPostprocessAllAssets(string[] importedAssets, string[] deletedAssets, string[] movedAssets,
11+
string[] movedFromAssetPaths)
12+
{
13+
if (importedAssets.Length != 0 || deletedAssets.Length != 0)
14+
{
15+
AssetsWereChanged?.Invoke();
16+
}
17+
}
18+
}
19+
}

0 commit comments

Comments
 (0)