GitAssetPostprocessor.cs 625 B

1234567891011121314151617181920212223
  1. // Copyright (c) 2025 TerraByte Inc.
  2. //
  3. // This script hooks into Unity's asset pipeline to automatically
  4. // trigger a refresh of the Better Git window when assets change.
  5. using UnityEditor;
  6. using UnityEngine.Scripting;
  7. namespace Terra.Arbitrator.GUI
  8. {
  9. [Preserve]
  10. public class GitAssetPostprocessor : AssetPostprocessor
  11. {
  12. private static void OnPostprocessAllAssets(string[] _, string[] __, string[] ___, string[] ____)
  13. {
  14. var window = ArbitratorWindow.Instance;
  15. if (window != null)
  16. {
  17. window.TriggerAutoRefresh();
  18. }
  19. }
  20. }
  21. }