RiderMenu.cs 636 B

12345678910111213141516171819202122232425
  1. using JetBrains.Annotations;
  2. using Packages.Rider.Editor;
  3. using Unity.CodeEditor;
  4. // Is called via commandline from Rider Notification after checking out from source control.
  5. // ReSharper disable once CheckNamespace
  6. namespace JetBrains.Rider.Unity.Editor
  7. {
  8. public static class RiderMenu
  9. {
  10. [UsedImplicitly]
  11. public static void MenuOpenProject()
  12. {
  13. if (RiderScriptEditor.IsRiderInstallation(RiderScriptEditor.CurrentEditor))
  14. {
  15. // Force the project files to be sync
  16. CodeEditor.CurrentEditor.SyncAll();
  17. // Load Project
  18. CodeEditor.CurrentEditor.OpenProject();
  19. }
  20. }
  21. }
  22. }