0.5.0: Added toolbar with scene picker
This commit is contained in:
parent
d35a79faf1
commit
27d7ecb2dd
19 changed files with 365 additions and 3 deletions
20
Editor/Toolbar/Tools/ToolScenePickerPostProcess.cs
Normal file
20
Editor/Toolbar/Tools/ToolScenePickerPostProcess.cs
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
using System.Linq;
|
||||
using Game.NavigationTool.Editor.Tools;
|
||||
using UnityEditor;
|
||||
|
||||
namespace Game.NavigationTool.Editor.Toolbar
|
||||
{
|
||||
internal sealed class ToolbarPostProcess : AssetPostprocessor
|
||||
{
|
||||
private static void OnPostprocessAllAssets(string[] importedAssets, string[] deletedAssets, string[] movedAssets, string[] movedFromAssetPaths)
|
||||
{
|
||||
if (HasChange(deletedAssets) || HasChange(movedAssets) || HasChange(importedAssets))
|
||||
ToolScenePicker.SetAsDirty();
|
||||
}
|
||||
|
||||
private static bool HasChange(string[] assets)
|
||||
{
|
||||
return assets.Any(s => s.EndsWith(".unity"));
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue