Search Unity

Unity3D 5.3 on fresh Fedora Installation

Discussion in 'Linux' started by Odd-Redesign, Mar 24, 2016.

  1. Odd-Redesign

    Odd-Redesign

    Joined:
    Jul 26, 2013
    Posts:
    134
    Hey! I just thought I would share a new experience - trying to setup my working environment on a fresh Fedora 23 installation. I recently installed Unity3D on Bunsenlabs Linux and sometimes I regret not documenting anything, especially when I actually solved problems to get it working.

    So far Fedora accepts Unity3D pretty well. I started by installing my nvidia-driver as a prerequisite. Proper hardware functionality was important for me and I don't know if I ever tried to install unity3d with nouveau.

    I downloaded the latest build #2016031701 (5.3.4f1) and moved it to ~/bin, extracted it to ~/bin/unity3d and tried to run Editor/Unity from the command line. Error. That was expected, since I could not really install the dependencies as easy as I could with Bunsenlabs (debian based) by just following the list of dependencies and throwing it at apt-get. I'm stuck with dnf and have to learn from the output Unity3d gives me.

    Code (bash):
    1. [user@localhost Editor]$ ./Unity
    2. ./Unity: error while loading shared libraries: libpq.so.5: cannot open shared object file: No such file or directory
    Well, let's find out where to get it:

    Code (bash):
    1. [user@localhost ~]$ dnf provides libpq.so.5
    2. Last metadata expiration check: 1:09:24 ago on Thu Mar 24 14:35:44 2016.
    3. postgresql-libs-9.4.5-1.fc23.i686 : The shared libraries required for any PostgreSQL clients
    4. Quelle  : fedora
    5.  
    6. postgresql-libs-9.4.6-1.fc23.i686 : The shared libraries required for any PostgreSQL clients
    7. Quelle  : updates
    First I installed the i686 package which didn't work, but

    Code (bash):
    1. sudo dnf install postgresql-libs
    did the trick. Unity3D started just fine and opened the splash screen. Sadly, the full-grey version that should've been fixed in this build! How can this be? I knew from my Bunsenlabs installation that the full-grey login screen was caused by a failed npm/nodejs job that didn't put a folder named unity-editor-home in the right npm-packages directory. So I realized that I'll have to install nodejs and npm.

    Code (bash):
    1. sudo dnf install nodejs npm
    Then I started Unity3D again and could watch it create new folders in my home directory. Seems like npm was working now, and I already found unity-editor home in /home/user/.local/share/unity3d/Packages/.npm.

    I attached a screenshot as a proof. I was quite surprised how easy the installation was. I'll update this thread to show what I do to integrate unity3D in my system. The unsupported installer does not create any .desktop files and does not solve dependencies, so there's still some stuff to do.

    One of the first things will be setting up Android Studio and Java 7 SDK to allow easy Android Game Development like I did on Linux Mint 17. I'll try to document everything, also to have a future reference for myself.
     

    Attached Files:

    Last edited: Mar 24, 2016
    Deleted User and FrostVoxel like this.
  2. Odd-Redesign

    Odd-Redesign

    Joined:
    Jul 26, 2013
    Posts:
    134
    Java SDK

    We need to get Java first since Android Studio requires it.

    Code (bash):
    1. [user@localhost bin]$ ./studio.sh
    2. JDK Required: 'tools.jar' seems to be not in Studio classpath.
    3. Please ensure JAVA_HOME points to JDK rather than JRE.
    Since we're on fedora and Oracle offers a .rpm file to install the Java SDK we're actually quite lucky. download it here

    It doesn't change Fedora's default java setting, though. This is actually not too bad since it doesn't change anything for our system, but I finding the jdk in /usr/java/jdk1.7.0_79/ instead of /usr/lib/jvm/ was unexpected. Android Studio uses JAVA_HOME to spot the jdk, so we can just set it for our user.

    Create a file named .profile in your home directory and add

    Code (bash):
    1.  
    2. export JAVA_HOME="/usr/java/jdk1.7.0_79/"
    3.  
    To make sure Android Studio finds your jdk. You'll need to logout and login to apply the change, or run the export statement once in your shell before you launch Android Studio.

    Android Studio

    I'll go for android studio since it cannot hurt and cares about downloading the android sdk and keeping it up to date.

    get it here

    Just download the linux archive (.zip file) and extract it to a neat place. I prefer ~/bin.
    You should then run /home/user/bin/android-studio/bin/studio.sh to start Android Studio and let it download the SDK. If it doesn't run, check the command line. If it's something like

    Code (bash):
    1. JDK Required: 'tools.jar' seems to be not in Studio classpath.
    2. Please ensure JAVA_HOME points to JDK rather than JRE.
    your JAVA_HOME is not set to the jdk's location.

    Android Studio will greet you nicely and start her very own Setup Wizard.

    Bildschirmfoto von »2016-03-24 17-43-11«.png

    The Wizard will download and install the Android SDK in /home/user/Android/Sdk. You don't need Android Studio to get the Sdk, but I find it a really good development environment to create android apps. Once the wizard is finished, you can close AS.

    Unity3D

    Now we only have to tell unity3D where to find both SDK's.

    Bildschirmfoto von »2016-03-24 17-59-57«.png

    After that I added my test scene to the build settings and exported for Android. The usual Bundle Identifier Error popped up and Fedora showed me stuff like this whenever it got no response from the build process:

    Bildschirmfoto von »2016-03-24 18-03-31«.png

    Sorry for german - it says the program does not respond and asks me to force quit. I didn't! I hit "wait" and after only some seconds my very first fedora .apk appeared on my drive.

    Bildschirmfoto von »2016-03-24 18-06-47«.png
    nice. Time to try it out with an actual game that I currently work on.
     
  3. Odd-Redesign

    Odd-Redesign

    Joined:
    Jul 26, 2013
    Posts:
    134
    Blender

    Ooh. Unity3D didn't find blender.

    Bildschirmfoto von »2016-03-24 18-13-16«.png

    Easy to install it with

    Code (bash):
    1. sudo dnf install blender
    but I actually just wanted to say thanks for the meaningful error message.

    Attaching the Phone

    My game opened just fine and worked well, so I thought I can safely continue attaching my Samsung Galaxy S3.
    Bildschirmfoto von »2016-03-24 18-16-11«.png
    I was a bit worried because Fedora didn't mount my phone automatically (which it usually does) but running ctrl+b (build and run) in Unity3D made it talk to me. The Build went just fine, with some strange error messages in the console.
    Bildschirmfoto von »2016-03-24 18-21-14«.png

    But who cares, the game opened on my phone and started like a charm. This runs pretty stable so far, very satisfying. The only annoying thing were the "xyz is not responding" messages from Fedora.

    You can download this glorious piece of software here and try to break the current cap of 300000 points.
     
  4. Odd-Redesign

    Odd-Redesign

    Joined:
    Jul 26, 2013
    Posts:
    134
    Monodevelop

    MonoDevelop did not start when double clicking a script file. It started working after I set the monodevelop executable in /home/user/bin/unity-editor-5.3.4f1/MonoDevelop/bin/ as an external editor.

    Bildschirmfoto von »2016-03-24 19-13-21«.png
    Bildschirmfoto von »2016-03-24 19-15-10«.png

    Update:

    I had to install the Source Code Pro fonts because I couldn't stand the bad font rendering in MonoDevelop. Fedora has pretty good font rendering but some fonts in some applications are worse than others.

    With Source Code Pro mono develop looks good again.

    Bildschirmfoto von »2016-03-24 19-15-10«.png
     

    Attached Files:

    Last edited: Mar 24, 2016
  5. Odd-Redesign

    Odd-Redesign

    Joined:
    Jul 26, 2013
    Posts:
    134
    I created a desktop shortcut for Unity named unity-editor.desktop and placed it in ~/.local/share/applications and /usr/share/applications.

    Code (csharp):
    1. [Desktop Entry]
    2. Version=5.3.4
    3. Name=Unity3D
    4. GenericName=Game Development Engine
    5. Comment=Develop Professional Games
    6. Exec=/home/user/bin/unity-editor-5.3.4f1/Editor/Unity %F
    7. Exec=/home/user/bin/unity-editor-5.3.4f1/Editor/Unity %U
    8. Icon=/home/user/bin/unity-editor-5.3.4f1/unity-editor-icon.png
    9. Terminal=false
    10. Type=Application
    11. StartupNotify=true
    12. Categories=Development;IDE;Application;
    13. MimeType=x-scheme-handler/com.unity3d.kharma;
    14. Keywords=game;development;unity;
    Had to reload gnome-shell with alt+F2 and "r"
     
  6. Odd-Redesign

    Odd-Redesign

    Joined:
    Jul 26, 2013
    Posts:
    134
    Small update.

    MonoDevelop does not recognize System.Collections.Generic

    I had the issue that MonoDevelop didn't recognize several classes, this included

    - Lists
    - IEnumerator
    - System.Serializable

    and much more. Many red words inside my Editor, even if the game builds just fine.

    This also reduced the amount of AutoCompletion Monodevelop could offer me. I fixed that today by reinstalling MonoDevelop with the instructions on this site: http://www.mono-project.com/docs/getting-started/install/linux/#usage

    Code (bash):
    1. rpm --import "http://keyserver.ubuntu.com/pks/lookup?op=get&search=0x3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF"
    2. dnf config-manager --add-repo http://download.mono-project.com/repo/centos/
    3. sudo dnf upgrade
    4. sudo dnf install --allowerasing mono-devel mono-complete referenceassemblies-pcl
    I could notice that it did upgrade my MonoDevelop Version to 5.9.6 and (I think that's important) my .NET Runtime Version from 4.0.5 to 4.2.3
     
  7. Gloomshroud

    Gloomshroud

    Joined:
    Apr 11, 2014
    Posts:
    27
    I just wanted to say THANK YOU. This saved my bacon! I am running Manjaro 17 and this is all quite new to me. Without you, I'd be stuck. I appreciate this.