nano ~/.local/share/applications/unity-editor.desktop
[Desktop Entry]
Name=Unity Editor
Exec=/home/USER/Unity/Hub/Editor/2022.3.40f1/Editor/Unity
Icon=/home/USER/Unity/Hub/Editor/2022.3.40f1/Editor/Data/Resources/LargeUnityIcon.png
Type=Application
StartupNotify=true
chmod +x ~/.local/share/applications/unity-editor.desktop
update-desktop-database ~/.local/share/applications/
I had this problem of Rider not being recognized after restarting Unity. I fixed by doing this:
Make sure both paths are created and with permissions
Edit -> Preferences -> Package Manager
/home/<user>/.config/unity3d/cache
/home/<user>/.local/share/unity3d
My .zshrc
:
export JAVA_HOME=/home/<user>/Unity/Hub/Editor/2022.3.40f1/Editor/Data/PlaybackEngines/AndroidPlayer/SDK
export PATH=$JAVA_HOME/bin:$PATH
which java
should point to the same sdk above. Fedora comes with a builtin java that needs the symlimk to be replaced or removed
/usr/bin/java -> /home/<user>/Unity/Hub/Editor/2022.3.40f1/Editor/Data/PlaybackEngines/AndroidPlayer/OpenJDK/bin/java