2017-08-15 21:48:07 Posted by RetroZelda

Unity on Linux

So, about 9 months ago, I decided to change the OS of my main dev machine at home to Ubuntu 16.10 with the goal of mastering a new OS, learning what I can about linux as a dev machine, and to help with some cross-platform development. Essentially, I wanted a new challenge for programming that didnt involve having a million different gcc environments on windows because that just became a mess. So, with a lost of my programming projects utilizing Unity, I reached a point where I needed to have multiple instances of unity inside of Ubuntu. Installing everything was fine, but it was always a pain to launch each version. So I developed a bash script that helps me load up any installed unity version through a single console command. Its a small script, but helps dramatically with launching projects, so I decided it should be shared. I have it attached to this post. To install, do the following: - Place the script inside /bin (or wherever you keep your custom scripts) - run command: sudo chmod +x /bin/unity_editor - Install unity versions via the installation script to /opt - Ensure the unity install folder is named similar to Unity-*Version*. Example: Unity-5.6.1. Now, you can execute the script by running: unity-editor *version*. So, if you have Unity-5.6.1, you will run: unity-editor 5.6.1. If you run without a version set, it will list out all version you have available on your machine. This helps me out greatly, and I hope it will help you out too.