Search Unity

Resolved Unity 2022.3.19 not finding Rider (via Jetbrains Toolbox)

Discussion in 'Linux' started by ReaktorDave, Feb 5, 2024.

  1. ReaktorDave

    ReaktorDave

    Joined:
    May 8, 2014
    Posts:
    139
    Unity v2022.3.19 and v2021.3.34 are not finding Rider 2023.3.3 installed via Jetbrains Toolbox in the "Preferences->External Tools" window.

    I'm on Manjaro Gnome 45.3 and Kernel 6.6. The Jetbrains Toolbox has been installed via downloading it from jetbrains.com and extracting it to "/home/shared/jetbrains-toolbox".

    I've added JetBrains Toolbox' shell script path to my user account's path variable so the command rider can be resolved:
    Code (CSharp):
    1. $which rider
    2. ~/.local/share/JetBrains/Toolbox/scripts/rider
    Also, running Rider from the terminal works fine.

    I have no idea how Unity did detect Rider in previous versions last year, but it seems to be broken at the moment. I'm using the latest Rider Unity Package for the respective engine versions.

    Any idea how I can get this working again or how I can dig up further info about this issue?
     
  2. ChiwTheNeko

    ChiwTheNeko

    Joined:
    Mar 24, 2022
    Posts:
    136
    Unity locates Rider using a nuget package that is conveniently named Rider.PathLocator (see here). I'm not sure how it works but I never had problem with getting Unity to find Rider.

    Do you have a desktop entry for Rider? I know I created one when I installed Rider. Probably that's what is doing the job. If you don't have one then try creating a file named jetbrains-rider.desktop into ~/.local/share/applications/. This is what mine looks like:

    Code (CSharp):
    1. #!/usr/bin/env xdg-open
    2. [Desktop Entry]
    3. Comment[en_US]=
    4. Comment=
    5. Encoding=UTF-8
    6. Exec=/home/chiw/Applications/JetBrainsRider-2021.2.3/bin/rider.sh
    7. GenericName[en_US]=
    8. GenericName=
    9. Icon=/home/chiw/Applications/JetBrainsRider-2021.2.3/bin/rider.svg
    10. MimeType=
    11. Name[en_US]=JetBrains Rider
    12. Name=JetBrains Rider
    13. Path=
    14. StartupNotify=true
    15. Terminal=false
    16. TerminalOptions=
    17. Type=Application
    18. Version=1.0
    19. X-DBUS-ServiceName=
    20. X-DBUS-StartupType=
    21. X-KDE-SubstituteUID=false
    22. X-KDE-Username=
    23.  
     
    ReaktorDave likes this.
  3. ReaktorDave

    ReaktorDave

    Joined:
    May 8, 2014
    Posts:
    139
    You're right, the package you linked to seems to look for .desktop files in ~/.local/share/applications: https://github.com/JetBrains/resharper-unity/blob/net233/unity/PathLocator/RiderPathLocator.cs#L80

    JetBrains Toolbox automatically installs its desktop files in that location. However, RiderPathLocator.cs expects the .desktop file to be named "jetbrains-rider.desktop" while JetBrains Toolbox puts the files with a postfixed checksum in there like "jetbrains-rider-c5e460cd-9963-409d-9a9a-0ee2b31cffb8.desktop". Renaming that desktop file to "jetbrains-rider.desktop" fixes the problem and Unity shows Rider in the preferences window.

    Thank you so much for your help!

    I guess this should be reported to JetBrains?
     
  4. ChiwTheNeko

    ChiwTheNeko

    Joined:
    Mar 24, 2022
    Posts:
    136
    Glad to know it fixed your problem. Yes, I think you should report it to whoever is maintaining that package.
     
    ReaktorDave likes this.
  5. ReaktorDave

    ReaktorDave

    Joined:
    May 8, 2014
    Posts:
    139
  6. ReaktorDave

    ReaktorDave

    Joined:
    May 8, 2014
    Posts:
    139
    The issue has been fixed via Rider package 3.0.28. No more workarounds necessary to detect Rider installed via JetBrains Toolbox!
     
    ChiwTheNeko likes this.