Unity3D
Not to be confused with Canonical's Unity (which is now maintained by the UBPorts Foundation and renamed to Lomiri).
From https://unity.com:
- The leading platform for creating interactive, real-time content
- Build 2D, 3D and VR games and apps at speed. From artist tools to LiveOps – everything you need to bring your vision to life today.
Installation
Unity has made available a program called Unity Hub that is designed to streamline your workflow by providing a centralized location where you can manage your Unity Projects and simplifies how you find, download, and manage your Unity Editor installs. The application comes available as a Deb or RPM package. To install the Unity Hub, simply install the unityhubAUR package.
To install the beta version, simply install the unityhub-betaAUR package.
Android Remote
Unity Remote is an Android app to help test input for Android devices. It achieves this by sending a compressed screenshot to the device each frame.
Install packages
Install the android-udev package, which will ensure you have correct udev rules for your device.
Install the android-sdkAUR package.
Configure the Editor
Open the editor, navigate to Edit > Preferences and set the correct paths to the Android SDK and the JDK.
- The Android SDK is usually in
/opt/android-sdk
. - The JDK varies by the version you are using, if you want to use the default set it to
/usr/lib/jvm/default
.
The navigate to Edit > Project Settings > Editor and set Unity Remote Device
to Any Android Device
.
For more help see the Unity documentation.
Prepare Android
Install Unity Remote 5 from the Play Store. Alternatively you can download and build it yourself from the Asset Store.
It is also recommended to set your Android device to PTP mode.
For more help see the Unity documentation.
Test
If you have Unity opened, close it.
Connect the phone to the computer and launch Unity Remote.
Open the Editor and press play. You should now see your game transmitted to your Android device.
If it does not work or you have questions, see the Unity Documentation.
Visual Studio Code
For those using the Visual Studio Code as their script editor, there are a few additional steps you need to do to get it running without displaying errors similar to:
[fail]: The reference assemblies for framework ".NETFramework,Version=v3.5" were not found
[warn]: OmniSharp.MSBuild.ProjectFile.ProjectFileInfo Unable to create directory "/Debug/". Access to the path "/Debug/" is denied. [fail]: OmniSharp.MSBuild.ProjectFile.ProjectFileInfo Could not write lines to file "/Debug/Assembly-CSharp.csproj.CoreCompileInputs.cache". Could not find a part of the path "/Debug/Assembly-CSharp.csproj.CoreCompileInputs.cache".
To eliminate these errors you need to install the following packages: , dotnet-sdk, , , and mono. Finally remember to install the C# extension from the VS Code Marketplace by pressing Ctrl-P and entering:
ext install ms-dotnettools.csharp
You will also want to make sure to set the option for the C#/Omnisharp extension to use the globally installed mono in your path. Add this line to your configuration:
"omnisharp.useGlobalMono": "always"
Troubleshooting
Crash logs are available at
Unity crashes on first launch before/while signing in
This is a rare bug where Unity's configuration gets created wrongly. You can try resetting it by:
Unity crashes when trying to load project
Users have reported that unsetting prevents the crash.
Unity crashes if ~/.config/user-dirs.dirs is missing
See how to generate the xdg files here: XDG user directories
Unity crashes with DllNotFoundException
In unity 2019 and newer, if you see a message along the lines of: , try installing .
Unity fails to build project to webGL plataform
IL2CPP needs libtinfo-5.so library for the building process and ncurses5 provides it. So make sure to install if you want to build to webGL.
Minor stuttering while playtesting (NVIDIA)
Vsync does not seem to work correctly with NVIDIA graphics cards / drivers. Solution: In nvidia-settings go to "OpenGL Settings" and turn off "Sync to VBlank".
The behaviour occured/noticed when used "transform.Rotate" in combination with "Input.GetKey".
Error: Multiple Unity instances cannot open the same project
Unity probably did not shutdown properly, in this case you should navigate to your project folder and delete Temp folder.
Android Remote not working / Running Android build fails with "Unable to forward network traffic to device"
Try this workaround :
- Close Unity.
- Shutdown adb daemon with
- Plug in the android device.
- Find your device ID with
- Use replacing with the correct one.
That's it now you can open unity and test it, an error "socket bind failed" will appear that you can safely ignore.
No window opens: Desktop is 0 x 0 @ 0 Hz
If using Wayland, try using the Xorg backend of SDL by setting the environment variable SDL_VIDEODRIVER=x11
.
Brotli invalid ELF header
If you see an error similar to:
Failed running python2 "$EDITOR_PATH/Editor/Data/PlaybackEngines/WebGLSupport/BuildTools/Brotli/python/bro.py"
Either replace the Brotli Mac OS X egg with a Linux egg at , or switch from Brotli to gzip in File > Buld Settings > Player Settings > Player > Publishing Settings > Compression Format.
Cannot load assets in package manager
If you have proxy/VPN configured, reset it. Resetting your firewall may also work (e.g., iptables#Resetting rules for iptables).
Menus don't react to clicks after entering play mode
First, install .
Then, run
downgrade glib2
and select version "2.72.1".