This is an instruction for installing Unity in Ubuntu 22.04, with plug-ins to work with ROS2 Humble and MuJoCo.
Python 3.10, ROS2 Humble (installation found here)
Unity is installed through Unity Hub, which is installed with the following steps.
- To add the public signing key, run the following command:
wget -qO - https://hub.unity3d.com/linux/keys/public | gpg --dearmor | sudo tee /usr/share/keyrings/Unity_Technologies_ApS.gpg > /dev/null
- To add the Unity Hub repository, you need an entry in /etc/apt/sources.list.d. Run the following command to add the Unity Hub repository:
sudo sh -c 'echo "deb [signed-by=/usr/share/keyrings/Unity_Technologies_ApS.gpg] https://hub.unity3d.com/linux/repos/deb stable main" > /etc/apt/sources.list.d/unityhub.list'
- Update the package cache and install the package:
sudo apt update
sudo apt-get install unityhub
Then open Unity Hub, click 'Installs' in the left column, then click 'Install Editor', then install the recommended Unity version.
Download pre-built releases (recommended) or build the package according to this tutorial for Ubuntu.
Then copy the built package Ros2ForUnity into your project Assets folder; or if you have deployed an .unitypackage - import it in Unity Editor by selecting Import Package → Custom Package
To use the plug-in, follow the instructions here.