Running Unity on Linux through Wine

From Unify Community Wiki
(Difference between revisions)
Jump to: navigation, search
m (Fixed and updated monodevelop script instructions.)
(Cleaned and restyled the PlayOnLinux section. Phew.)
Line 64: Line 64:
 
[http://wiki.unity3d.com/index.php/Running_Unity_on_Linux_through_Wine#Editing_image_assets_with_a_native_Linux_Image_Manipulation_Program Skip PlayOnLinux section>>>]
 
[http://wiki.unity3d.com/index.php/Running_Unity_on_Linux_through_Wine#Editing_image_assets_with_a_native_Linux_Image_Manipulation_Program Skip PlayOnLinux section>>>]
  
==Installing PlayOnLinux==
+
==Installation with PlayOnLinux==
  
PlayOnLinux is a program that is able to manages different wine versions for cases when a Windows application works on wine version but not another and so allows easy switching without also breaking another Windows application.
+
PlayOnLinux is a program that is able to manages different wine versions for cases when a Windows application works on one wine version but not on another and so it allows easy switching between them without breaking another Windows application.
  
Follow [http://www.playonlinux.com/en/download.html installation instructions provided by PlayOnLinux] for your operating system/distribution.
+
Most of these numbered steps come from a user called 'Tomza', you can read [http://tomaszzackiewicz.wordpress.com/2013/11/16/run-unity3d-on-linux-with-wine-solved/ his blog post on this issue] for reference.
  
==Download Unity Installer (Windows)==
+
===Install PlayOnLinux===
  
Download the Windows installer of Unity from the [http://unity3d.com/unity/download Official Site]. Do not try to run/execute the file.
+
Follow the [http://www.playonlinux.com/en/download.html installation instructions provided by PlayOnLinux] for your distribution.
  
==Installing Wine and Unity using PlayOnLinux==
+
===Download the Windows Unity Installer===
  
Most of these numbered steps come from a user called 'Tomza', you can find [http://tomaszzackiewicz.wordpress.com/2013/11/16/run-unity3d-on-linux-with-wine-solved/ his blog post on this issue] on his blog for reference.
+
Download the Windows installer of Unity from the [http://unity3d.com/unity/download official site]. Do not run/execute the file.
  
 
===PlayOnLinux first launch===
 
===PlayOnLinux first launch===
  
When you run PlayOnLinux for the first time, you will get the PlayOnLinux Wizard:
+
When you run PlayOnLinux for the first time, you will see the PlayOnLinux Wizard:
  
* Possible first warning
+
; Possible first warning:
<pre>
+
<ol style="list-style-type: none;">
 +
<li><pre>
 
PlayOnLinux cannot find wine (from Wine)
 
PlayOnLinux cannot find wine (from Wine)
  
 
You should install it to use PlayOnLinux
 
You should install it to use PlayOnLinux
</pre>
+
</pre></li>
 +
<li>The reason for this warning is that PlayOnLinux wanted add the natively installed Wine as one of available Wine versions, which sometimes might not be present.</li>
 +
<li>Click '''OK'''.</li>
 +
</ol>
  
The reason for this warning could be that PlayOnLinux would add the natively installed Wine as one of available Wine versions. This should cause no problems.
+
; Possible second warning
 
+
<ol style="list-style-type: none;">
Click OK
+
<li><pre>
 
+
* Possible second warning
+
<pre>
+
 
PlayOnLinux cannot find 7z (from P7ZIP full)
 
PlayOnLinux cannot find 7z (from P7ZIP full)
  
 
You should install it to use PlayOnLinux
 
You should install it to use PlayOnLinux
</pre>
+
</pre></li>
 +
<li>7zip is an archive creator, extractor. We don't need this now.</li>
 +
<li>Click '''OK'''.</li>
 +
</ol>
  
7zip is an archive creator, extractor.
+
; Possible third warning
 
+
<ol style="list-style-type: none;">
Click OK
+
<li><pre>
 
+
* Possible third warning
+
<pre>
+
 
Windows Fonts useful for all programs you will run on PlayOnLinux
 
Windows Fonts useful for all programs you will run on PlayOnLinux
  
 
Install Windows fonts
 
Install Windows fonts
</pre>
+
</pre></li>
 +
<li>Linux does not come with Windows fonts. This is solved by the script, no need to worry about it.</li>
 +
<li>Click '''Next'''.</li>
 +
</ol>
  
Linux does not come with all fonts native to Windows.
+
When all is over, you should see '''Enjoy using PlayOnLinux'''.
 
+
Click Next
+
 
+
* When all is ready
+
 
+
You should see:
+
 
+
Enjoy using PlayOnLinux
+
  
 
===Managing wine versions===
 
===Managing wine versions===
  
1. From PlayOnLinux's window header choose '''"Tools"''' -> '''"Manage Wine Versions"'''.
+
# From PlayOnLinux's window header choose '''"Tools"''' -> '''"Manage Wine Versions"'''.
 +
# Choose a recent Wine version, 32 bit if you're on a 32 bit system or you're going to install the 32 bit editor, 64 bit otherwise.<br />'''Warning:''' Remember that the newest Wine can be unstable (Wine 1.6.2 is stable), but, at the same time, some bugs can be fixed in the recent version, and that’s why it can be the best way to go for you; fortunately, you can choose the Wine version in PlayOnLinux you like even after installing an application; the recent version is recommended for running Unity3D because of 3D driver improvements.
 +
# Click the arrow to install your version of Wine.
  
2. Choose a recent 32bit Wine version, Unity 3D editor won't be 64bit until Unity 5.
+
===Getting the script===
  
Warning: Remember that the newest Wine can be unstable (Wine 1.6.2 is stable), but, at the same time, some bugs can be fixed in the recent version, and that’s why it can be the best way to go for you; fortunately, you can choose the Wine version in PlayOnLinux you like even after installing an application; the recent version is recommended for running Unity3D because of 3D driver improvements.
+
A PlayOnLinux script has been created by the Unity Community to easily install Unity. Save the following script to your disk in plain text. You can call it as you want, but the .pol extension should be kept so that PlayOnLinux can recognize it as its script.
  
3. Click the arrow to install your version of Wine
+
You can find the script [https://github.com/Unity3D-Wine-Support/Unity3D-on-Wine/blob/master/unity.pol on GitHub].
  
===Installing Unity===
+
; Warning for Ubuntu users
 +
: This script will fail with an due to system wide parameter called 'ptrace_scope'. See '''[http://www.playonlinux.com/en/topic-10534-Regarding_ptrace_scope_fatal_error.html Regarding ptrace_scope fatal error]''' for a fix.
  
4. A PlayOnLinux script has been created by the Unity Community to easily install Unity. Save the following script to your disk in plain text – unity.pol. You can call it as you want, but the .pol extension should be kept so that PlayOnLinux can recognize it as its script.
+
====Adjusting the wine version====
 
+
Depending on your installed wine versions you may want to change the Wine version before running the script.
[https://github.com/Unity3D-Wine-Support/Unity3D-on-Wine/blob/master/unity.pol View unity.pol script]
+
 
+
[https://github.com/Unity3D-Wine-Support/Unity3D-on-Wine/raw/master/unity.pol Download unity.pol script]
+
 
+
'''Note:''' depending on your installed wine versions edit the script and change the Wine version before running the script
+
 
+
For example, the script has Wine version at Wine 1.7.35, so change it to:
+
  
 +
Just change this line accordingly:
 +
<pre>
 
POL_Wine_PrefixCreate “Your.Version.Number”
 
POL_Wine_PrefixCreate “Your.Version.Number”
 +
</pre>
  
Save, that’s all.
+
===Installing Unity===
  
'''Warning for Ubuntu users:''' This script will fail with an due to system wide parameter called 'ptrace_scope'. See '''[http://www.playonlinux.com/en/topic-10534-Regarding_ptrace_scope_fatal_error.html Regarding ptrace_scope fatal error]''' for a fix.
+
<ol>
 
+
<li>From PlayOnLinux, go to '''Tools''''''Run a local script'''.</li>
5. From PlayOnLinux's window header choose '''"Tools"''' -> '''"Run a local script"'''.
+
<li>Choose the script and click '''Next'''.</li>
 
+
<li>You will see the warning that the signature of the script isn’t valid. It is an unofficial script, so you can safely ignore it. Click '''Next'''.</li>
6. Choose the script that was made for automating the installation process of Unity3D and '''click Next'''.
+
<li>You will be able to review the script. If it's fine, check '''I agree''' and click '''Next'''.</li>
 
+
<li>Then you will see the installation wizard, click '''Next''', the following should appear:
7. You will see the warning that the signature of the script isn’t valid. Ignore it! '''Click Next'''.
+
<pre>The script is running
 
+
8. You will be able to review your script and check if its content is OK before running. If OK, check I agree and '''click Next'''.
+
 
+
9. Then you will see the installation wizard, click Next, the following should appear:
+
 
+
<pre>
+
The script is running
+
  
 
a virtual drive is being created first – it will be the place where your whole installation will be placed.
 
a virtual drive is being created first – it will be the place where your whole installation will be placed.
Line 166: Line 154:
 
a/ The environment for the virtual disk
 
a/ The environment for the virtual disk
 
</pre>
 
</pre>
 +
When you run PlayOnLinux for the first time, some extra software may be installed.
  
9. When you run PlayOnLinux for the first time, some extra software may be installed
+
PlayOnLinux should now be installing the components it needs for Unity3D and MonoDevelop to work on Wine. The list of their names is included in the script you are using. They are really important, so wait patiently.
 
+
</li>
The installation is ongoing – it isn’t too easy and you may see some errors because and probably will be forced to install some additional software in vitual disk.
+
<li>When the script installs up the components, find the Unity setup executable on your disk through the PlayOnLinux window.</li>
 
+
<li>Install Unity3D just like in Windows. Follow the instructions during the installation. You may want to install the AngryBots project to test your installation of Unity. If errors appear, don't worry about them too much – they probably aren't show-stoppers.</li>
After our tests, we know that to run Unity3D and MonoDevelop with no problems, we need all .NET versions installed in Wine. They are all added automatically within the script.
+
<li>Click '''Finish''' in the Unity installation wizard '''and''' the PlayOnLinux installation wizard.
 
+
You will see the Unity icon in the main PlayOnLinux window – you can start Unity from here if you want.
PlayOnLinux is installing the components it needs for Unity3D and MonoDevelop working on Wine. The list of their names is included in the script you are using. They are really important, so wait to the end of the installation patiently.
+
<li>You can see two Unity icons on your desktop. Delete the one called simply "Unity", which is created by the Unity installer and might not work. "Unity3D" is the one created by the script.
 
+
<li>If you haven't launched Unity yet, do it.</li>
10. When the script in PlayOnLinux installs up all the components in Wine, find the Unity3D setup executable on your disk through the PlayOnLinux window.
+
<li>Do everything Unity wants you to do (Activate your Unity License – free or pro, log in to your Unity account). Click '''Start using Unity''' to start using Unity, obviously.</li>
 
+
<li>When you see the '''Project Wizard''' dialog, you may want to open the AngryBots project (if you chose to install it) for testing purposes. It is located under "C:\users\Public\Documents\Unity Project\". Disk '''Z:''' is your Linux disk.
11. Install Unity3D with using PlayOnLinux (just like under Windows). Follow the instructions you see during the Unity3D installation. You may install AngryBots project to test your installation of Unity. Among others, you need NET Framework 4.0 Extended. All will be installed automatically. Do not worry about errors too much if any maybe they aren’t so important. PlayOnLinux can be even hang up. In such case reboot PlayOnLinux.
+
<li>If everything is working fine, celebrate.</li>
 
+
</ol>
12. Click Finish on the Unity3D installation wizard.
+
 
+
When Unity3D is installed inside PlayOnLinux, you see the Unity3D icon in the main PlayOnLinux window – you can start Unity3D from here if you want.
+
 
+
13. You can see two Unity3D icons on your desktop. The called simply "Unity" might not work, which is installed by the Unity installer. "Unity3D" is the one created by the script.
+
 
+
'''Warning:''' If you reinstall Unity3D (install again on the same computer), it’s good to remove the remaining shortcut on your desktop (one of the two). One is removed automatically, but the second remains. It can make problems for making a new shortcut for a new Unity3D installation. You may do that even during Unity3D installation, but before the end of the installation because the new shortcuts are made in this time. If you don’t do that, your installation can be corrupted. You will see only one shortcut on your desktop. But this shortcut probably won’t work.
+
 
+
14. Do everything Unity3D wants from you (Activate your Unity License – free or pro; log in to your Unity3D account – you should have the account; if don’t, make one; then, click Start using Unity).
+
 
+
15. When you see the dialog (Project Wizard) for creating or opening a new project for Unity3D, you may want to open the AngryBots project if you chose to install it for testing purposes. It is located under "C:\users\Public\Documents\Unity Project\", disk "Z:" is your Linux disk.
+
 
+
16. Unity3D is now running.
+
  
 
==Editing image assets with a native Linux Image Manipulation Program==
 
==Editing image assets with a native Linux Image Manipulation Program==

Revision as of 16:26, 30 March 2015

For how to run the Unity Web Player on Linux native browsers see the Running Unity Web Player on Linux using Pipelight page.

Officially Unity Technologies only support creating executable standalone games/3D applications which can then be run on Linux, specifically Ubuntu 10.04 or newer(Source). This is done by using the Unity Editor in Microsoft Windows and OS X operating systems. Unity Technologies do not provide a Linux version of the Unity Editor. Unity Editor can still be launched on Linux by using the Windows version of the editor with mimicked Windows libraries provided by the Wine software. Stability of the editor depends on particular Linux distributions and the video/graphics cards.

If you would like Unity Technologies to create a Linux version of Unity Editor, please vote for it on Unity Feedback. This feature has been the most requested feature for many months.

Contents

Prerequisites

  • An operating system/distribution that is able to run Wine, also see 'Tested successfully on distributions' section within this wiki page.
  • Newest stable drivers for your graphics card

If you plan to use the lengthy PlayOnLinux method of installing Unity you will also need:

  • PlayOnLinux - Software that is able to manage multiple versions of Wine.
  • Most recent Wine on PlayOnLinux - This is installed from within PlayOnLinux, a native installation of Wine is not required.
  • Official Windows installer file for Unity (Versions of 4.X.X and 5.X.X are the ones tested )

Tested successfully on following distributions

Users from the community have reported of getting Unity working on the following operating systems/distributions:

  • openSUSE 13.1 (reported to be most stable at running the Unity editor)
  • Ubuntu 12.10/13.10/14.04, Lubuntu 13.10/14.04/14.10 and Xubuntu 14.04 (for now the only distros that receive Unity Technologies support for Linux Standalone Unity applications and Valve Software's support for running Steam)

Installing Unity using the terminal with a winetricks script (Experimental, yet quicker)

User "Doctor Jellyface" saw the use of PlayOnLinux as unnecessary way to install Unity, even with the better graphics interface that PlayOnLinux offers. So he created a winetricks script that installs Unity and all the necessary libraries to make Unity work on a native Wine.

1. Install Wine, by following instructions from its official website for your Linux distribution.

2. Download the newest Unity installation script from github.

3. If you have a 64 bit operating system, then it best to set the default Arch to 32 bit for new Wineprefixes as winetricks does not have much support for 64bit wineprefixes. So before proceeding with the next step, set the environment variable through your terminal:

$ export WINEARCH=win32

(Example given for Ubuntu Linux, this environment variable will only last in that terminal session, which is enough while installing Unity)


4. Open up a terminal, move to the location of the downloaded ".verb" script and run the script using winetricks(installed by default with some "Wine" distro packages, if not see winetricks install page):

$ winetricks -q "./unity3d.verb"

If this does not fully complete, remove the "-q" argument to debug.

5. A 'Unity' shortcut should be on your desktop. Wine should be launching it. If it does not then the Unity prefix should be located under "~/.local/share/wineprefixes/unity3d".

Skip PlayOnLinux section>>>

Installation with PlayOnLinux

PlayOnLinux is a program that is able to manages different wine versions for cases when a Windows application works on one wine version but not on another and so it allows easy switching between them without breaking another Windows application.

Most of these numbered steps come from a user called 'Tomza', you can read his blog post on this issue for reference.

Install PlayOnLinux

Follow the installation instructions provided by PlayOnLinux for your distribution.

Download the Windows Unity Installer

Download the Windows installer of Unity from the official site. Do not run/execute the file.

PlayOnLinux first launch

When you run PlayOnLinux for the first time, you will see the PlayOnLinux Wizard:

Possible first warning
  1. PlayOnLinux cannot find wine (from Wine)
    
    You should install it to use PlayOnLinux
    
  2. The reason for this warning is that PlayOnLinux wanted add the natively installed Wine as one of available Wine versions, which sometimes might not be present.
  3. Click OK.
Possible second warning
  1. PlayOnLinux cannot find 7z (from P7ZIP full)
    
    You should install it to use PlayOnLinux
    
  2. 7zip is an archive creator, extractor. We don't need this now.
  3. Click OK.
Possible third warning
  1. Windows Fonts useful for all programs you will run on PlayOnLinux
    
    Install Windows fonts
    
  2. Linux does not come with Windows fonts. This is solved by the script, no need to worry about it.
  3. Click Next.

When all is over, you should see Enjoy using PlayOnLinux.

Managing wine versions

  1. From PlayOnLinux's window header choose "Tools" -> "Manage Wine Versions".
  2. Choose a recent Wine version, 32 bit if you're on a 32 bit system or you're going to install the 32 bit editor, 64 bit otherwise.
    Warning: Remember that the newest Wine can be unstable (Wine 1.6.2 is stable), but, at the same time, some bugs can be fixed in the recent version, and that’s why it can be the best way to go for you; fortunately, you can choose the Wine version in PlayOnLinux you like even after installing an application; the recent version is recommended for running Unity3D because of 3D driver improvements.
  3. Click the arrow to install your version of Wine.

Getting the script

A PlayOnLinux script has been created by the Unity Community to easily install Unity. Save the following script to your disk in plain text. You can call it as you want, but the .pol extension should be kept so that PlayOnLinux can recognize it as its script.

You can find the script on GitHub.

Warning for Ubuntu users
This script will fail with an due to system wide parameter called 'ptrace_scope'. See Regarding ptrace_scope fatal error for a fix.

Adjusting the wine version

Depending on your installed wine versions you may want to change the Wine version before running the script.

Just change this line accordingly:

POL_Wine_PrefixCreate “Your.Version.Number”

Installing Unity

  1. From PlayOnLinux, go to ToolsRun a local script.
  2. Choose the script and click Next.
  3. You will see the warning that the signature of the script isn’t valid. It is an unofficial script, so you can safely ignore it. Click Next.
  4. You will be able to review the script. If it's fine, check I agree and click Next.
  5. Then you will see the installation wizard, click Next, the following should appear:
    The script is running
    
    a virtual drive is being created first – it will be the place where your whole installation will be placed.
    
    a/ The environment for the virtual disk
    

    When you run PlayOnLinux for the first time, some extra software may be installed.

    PlayOnLinux should now be installing the components it needs for Unity3D and MonoDevelop to work on Wine. The list of their names is included in the script you are using. They are really important, so wait patiently.

  6. When the script installs up the components, find the Unity setup executable on your disk through the PlayOnLinux window.
  7. Install Unity3D just like in Windows. Follow the instructions during the installation. You may want to install the AngryBots project to test your installation of Unity. If errors appear, don't worry about them too much – they probably aren't show-stoppers.
  8. Click Finish in the Unity installation wizard and the PlayOnLinux installation wizard. You will see the Unity icon in the main PlayOnLinux window – you can start Unity from here if you want.
  9. You can see two Unity icons on your desktop. Delete the one called simply "Unity", which is created by the Unity installer and might not work. "Unity3D" is the one created by the script.
  10. If you haven't launched Unity yet, do it.
  11. Do everything Unity wants you to do (Activate your Unity License – free or pro, log in to your Unity account). Click Start using Unity to start using Unity, obviously.
  12. When you see the Project Wizard dialog, you may want to open the AngryBots project (if you chose to install it) for testing purposes. It is located under "C:\users\Public\Documents\Unity Project\". Disk Z: is your Linux disk.
  13. If everything is working fine, celebrate.

Editing image assets with a native Linux Image Manipulation Program

By default Unity will open image files with Internet Explorer. While it is possible to set a Linux executable to be run by Unity in its preferences, the file path that Unity will provide is a Windows styled one '/PlayOnLinux Drive/C:\UnityProject\Assets' which the image manipulation program will probably not recognize.

Wine has a tool that can translate Windows styled paths to Unix styled paths. A shell script can be used as the target to translate the path before giving it to the desired program, in this case GIMP:

#!/bin/sh
if [ -z "$1" ]
then
	echo "No file specified"
	exit 1
fi

# Change 'gimp' to the command name of your desired image manipulation program.
gimp "`wine winepath -u "$1"`"
# Note that the 'wine winepath', which translates Windows path name to Unix, is the natively installed 'wine'.

echo "Opening $1 with GIMP"
exit 0

Save it to a file that Unity can see and set it as an executable(like 'chmod 755' through the terminal), then set the shell script as the Image Manipulation program in Unity Preferences.

NOTE: A native 'Wine' version needs to be installed for this script to work. TODO: Make the script use PlayOnLinux's installed Wine to translate file paths.

Editing scripts with a native Linux script editor

Depending if you installed Unity with MonoDevelop, then Unity will open script files with either Notepad or MonoDevelop by default. Same when double-clicking on script errors and warnings. While it is possible to set a Linux executable to be run by Unity in its preferences, the file path that Unity will provide is a Windows styled one '/PlayOnLinux Drive/C:\UnityProject\Assets' which the editor will probably not recognize.

Wine has a tool that can translate Windows styled paths to Unix styled paths. A shell script can be used as the target to translate the path before giving it to the desired program and also providing the line of code to jump to.

Sublime Text

#!/bin/sh
if [ -z "$1" ]
then
    echo "No file specified"
    exit 1
fi

# Change '/opt/sublime_text/sublime_text' to the path of your executable for desired IDE.
/opt/sublime_text/sublime_text "`wine winepath -u "$1"`:$2:$3"
# Note that the 'wine winepath', which translates Windows path name to Unix, is the natively installed 'wine'.

echo "Opening '$1' on line '$2' column '$3' with Sublime Text"
exit 0

Kate

#!/bin/sh
if [ -z "$1" ]
then
    echo "No file specified"
    exit 1
fi

# We assume that the kate executable is lies in '/usr/bin/'. Change the path if necessary.
/usr/bin/kate "`winepath -u "$1"`" -l "$2"
# Note that the 'wine winepath', which translates Windows path name to Unix, is the natively installed 'wine'.

echo "Opening '$1' on line '$2' with Kate"
exit 0

Save it to a file that Unity can see and set it as an executable(chmod 755), then set the shell script as the External Script Editor program in Unity Preferences with correct format in its arguments, for this shell script it's '"$(File)" $(Line)' (without the '').

NOTE: A native 'Wine' version needs to be installed for this script to work. TODO: Make the script use PlayOnLinux's installed Wine to translate file paths.

MonoDevelop (Native)

User Radivarig created a script to use a native (Linux) version of MonoDevelop as the editor. It handles pretty much everything, and the functionality shouldn't be different than on Windows.

You can find the script on GitHub.

Usage: 1. Download the script and give it execution rights like so (assuming you installed Unity into the default wine prefix):

wget https://raw.githubusercontent.com/Unity3D-Wine-Support/Unity3D-on-Wine/master/text-editors-MonoDevelop/unity3d_native_monodevelop.sh
mkdir ~/.wine/drive_c/Program\ Files/Editors
mv ./unity3d_native_monodevelop.sh ~/.wine/drive_c/Program\ Files/Editors
chmod +x ~/.wine/drive_c/Program\ Files/Editors/unity3d_native_monodevelop.sh
2. Set the script as the editor in Unity: navigate to Edit->Preferences->External Tools and set the script as the editor, with arguments
"$(File)" $(Line)

Custom editor

You can use this script as a base to make your own editor launcher.

Troubleshooting

First see if your issue hasn't already been resolved by someone in GitHub Closed/Resolved Issues.

If it is not, raise your issue there in GitHub Open Issues.

The following may not be up to date.

Unity Asset store does not work (Has a workaround)

If you install Unity 5.0.0f4 the unity Asset store will work perfectly!

Reported by all that the Asset store window/tab shows up gray, but some elements on the window are picked up judging from that the mouse cursor changes. Some believe it is a WebKit issue.

Workaround: "You can search assets from Asset Store by using search box on Project View and you can easily download assets and login without opening assets store view." - by "dialytica" of GitHub

WineHQ bug report - http://bugs.winehq.org/show_bug.cgi?id=34039

Issue on GitHub - https://github.com/Unity3D-Wine-Support/Unity3D-on-Wine/issues/5

Project Creation: "Specified path is not valid..." error message

While it might seem strange, this is an Internet Explorer issue. It is fixed by installing Internet Explorer 8. Preferably using winetricks "ie8" or in PlayOnLinux case, "Internet Explorer 8" component.

"-force-opengl" option crashing Unity (Experimental fix)

By default Unity Editor for Windows uses Direct3D to render graphics and Wine redirects Direct3D calls to OpenGL calls, which has compatibility and performance issues. Unity Technologies have included "-force-opengl" argument to force Unity to use OpenGL.

The reason for the crash is supposedly "because Unity 3/4 does something with OpenGL contexts that is acceptable for WGL, but not for the Linux equivalent layer called GLX.". But there exists a patch for Wine that allows Unity to run in OpenGL mode, but, to add the patch, Wine has to be compiled with it included.

Performance gains are reported to be between 10% to 400%.

How to fix: If you have a 32bit Linux distribution, follow instructions in this script(note that it is for Ubuntu), you may skip the following numbered steps.

1. If you have a 64bit Linux distribution, then it should be noted that winetricks does not have full support for 64bit Wine as of yet. Follow the instructions on how to compile a 32bit Wine on a 64bit OS here, only up to the point of getting the source code.

2. Before compiling Wine, add the patch to the source code folder through the terminal:

3. Compile Wine.

4. Run Unity with the new Wine using something like

  • > env WINEPREFIX="~/.local/share/wineprefixes/unity3d" ~/wine32/wine ~/.local/share/wineprefixes/unity3d/drive_c/Program\ Files/Unity/Editor/Unity.exe -force-opengl

Results: Screenshot of a empty scene with a cube

Ubuntu: Windows cannot be fully maximized

This might actually be an issue for all Wine applications contained within a window. See the following answered question for the way in fixing this issue: http://askubuntu.com/questions/267843/how-can-i-fully-maximize-wine-applications

Unity dashboard is all grayed out

This bug may appear when the Linux system's timezone is set as a "named" timezone (like "America/Sao Paulo"). Switch the timezone to another, which is not named and has only the GMT code, like 'GMT+3'.

To do this, open up a terminal.

For Ubuntu/Debian type: sudo dpkg-reconfigure tzdata

In the menu that opens up, go down and choose "etc" and set right timezone code according to your location in GMT.

NVIDIA: Unity does not refresh windows often enough

When selecting a game object, the inspector might not refresh at the right time, showing the previous game object. Same thing may happen when writing text in a text input and seeing the previous state.

Steps to reproduce:

  1. Click on a GameObject.
  2. In inspector click on show/hide Transform tag multiple times until the line is turns up gray as if it is opened, but doesn't seem like it.
  3. When this happens, click the inspector tab(to refresh the window) and then on a parameter. When writing you should see only the previous state of the text.

Reported on:

  • Ubuntu 13.10/14.04
  • Wine 1.7.15/.16/.17/.18
  • Graphics card: NVIDIA Geforce 9600GT/GT320M
  • NVIDIA driver (proprietary) 319/331.38
  • NVIDIA driver (open-source) 331.67/334.21/337.12/337.25 (These are made available when adding ppa:xorg-edgers/ppa repository)

Most likely culprit:

NVIDIA graphics drivers, although in -force-opengl mode other vendor graphics cards also experience this bug.

How to solve:

  • Enable "Strict Draw Ordering". You have to add a key to the registry, see [UsefulRegistryKeys]. For PlayOnLinux installation of Unity, there is an option in its configuration. This might impact performance.

Or

  • Use the Nouveau graphics driver, which does not have up to date 3D acceleration.

Built-in MonoDevelop doesn't launch

This sometimes happens because Wine launches MonoDevelop in a new wineprefix. Luckily, Radivarig created a script to fix this. Simply download the script, give it execution rights and set it as the editor in Unity.

You can find the script on Github.

Community Support

Github repository for Wine related scripts and issues

https://github.com/Unity3D-Wine-Support/Unity3D-on-Wine

If you have a Github account, it is recommended to set this repository as "Watch" in order to be notified of enhancements and bugfixes.

Github Unity3D-on-Wine Issues page

First see if your issue hasn't already been resolved by someone in Closed/Resolved Issues.

If it is not, raise your issue there in Open Issues.

Unity Forum Thread

Visit and contribute in the forum thread created on the Official Unity Forum.

Wine Application Database (AppDB)

Unity Editor page - https://appdb.winehq.org/objectManager.php?sClass=application&iId=11075

If you have used the Unity Editor for notable amount of time, then it would be helpful to vote for the closest compatible test done within AppDB or make your own test.

IRC channels

Unofficial IRC channel on freenode is #unity3d-wine, since it is unofficial few to none users may be on it, don't leave it because of that.

You may also try raising your issue on official Wine related IRC channels #playonlinux or #winehq.

Personal tools
Namespaces

Variants
Actions
Navigation
Extras
Toolbox