Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

Unity3D on Linux with Wine: Support thread

Discussion in 'Editor & General Support' started by wnk, Nov 15, 2013.

  1. fjalla

    fjalla

    Joined:
    Nov 6, 2012
    Posts:
    73
    Great! As happy as you.

    Come on, break it to us, did you use the winetricks version or the POL version?

    Btw, system specifications, so that we know where it works? (graphics card, wine version, 32 or 64 bit, etc.) Thanks.
     
  2. Deleted User

    Deleted User

    Guest

    I used exactly the Cauê s tutorial and the pol on first page.

    My note specs:

    Captura de tela de 2014-06-07 15:22:18.png

    And, Unity Screen in action

    Captura de tela de 2014-06-07 15:25:43.png

    In first time the screen apears in gray, so i change the system time ( são paulo br ) to London, like Cauê said, and works.

    The Graphic Card is nVIDIA GeForce 310M.

    :)
     
  3. Tomza

    Tomza

    Joined:
    Aug 27, 2013
    Posts:
    596
    It's great it works for you, sergio, but Cauê's tutorial is old. A lot things has changed. Tell me can you create an Unity project in the way you see under Windows? Now, you don't need any tricks. Everything works as under Windows, but Asset Store.
     
  4. Deleted User

    Deleted User

    Guest

    Hi Tomza, i create a empty folder and use file menu to open. Import project from windows works well. Asset Store not work :(
    I will try the most recent way, but im very happy so far. Thanks for you effort, encouraged me a lot to try.
     
  5. fjalla

    fjalla

    Joined:
    Nov 6, 2012
    Posts:
    73
    @sergio alexandre - it works perfectly (or so it is reported) in the most recent version.

    Btw, @Tomza & @Pendrokar - maybe we could create a GitHub page for the scripts, it will make it a lot cleaner and simpler.

    Also, found out that winetricks doesn't work with a 64 bit install of wine yet :/
    To make a 32 bit Unity wineprefix you would need the default one to be 32 bit too.

    I could make a script that would first delete the default wineprefix if it is 64 bit, and install a new 64 bit one, but I don't think anyone would like that :/

    It might not be that a big a problem now, since Unity is only 32 bit yet, but Unity 5 will come with a 64 bit editor too.

    Anyway, if you want to run Unity with winetricks on a 32 bit wine install, you need to run this:

    Code (sh):
    1. rm -rf ~/.wine
    WARNING - this will remove the whole .wine folder in your user directory, with everything in it.

    Then run

    Code (sh):
    1. WINEARCH=win32 winecfg
    That will create a new 32 bit wineprefix.

    Then you can install Unity with winetricks with the script as usuall.
     
  6. DamianU3D

    DamianU3D

    Joined:
    Jun 15, 2014
    Posts:
    2
    Hi all i'am return on unity3d forum with new account but have couple idea :) for repair unity :)
    for Asset Store is only answer why not works AssetStore = WebKIT :)
    Links not works ? not completly for working links and working browse in explorer you must repair couple regedit keys and voila works :) and now prepare new virualmachine with linux and beginning new experminet with unity 3d :)

    And sorry when i'not a be
     
    Last edited: Jun 15, 2014
  7. fjalla

    fjalla

    Joined:
    Nov 6, 2012
    Posts:
    73
    Ya, we know this.

    What keys please? There are a milion of them :D

    If you have the mood to write them down, please do :)
     
  8. DamianU3D

    DamianU3D

    Joined:
    Jun 15, 2014
    Posts:
    2
    I'll do a few tests of my ideas, and if you check share my results
     
  9. riposteCreations

    riposteCreations

    Joined:
    Jun 15, 2014
    Posts:
    4
    I've just managed to get mine up and running. I'm using OpenSuse13.1 and PlayonLinux. I encountered a few little issues though so thought I'd post my solutions in case anybody else has the same issues.

    I used the original script, modded just to change Wine version to 11. The installer was hanging on installing dotnet 3.5. I cancelled it and it /seemed/ to still have worked (Unity loaded and I could run my project) but MonoDevelop was missing.

    To solve it, I went to Configure in PoL and manually installed all the dotnet versions up to 4. I re-ran the installer via PoL configuration; Wine ->Wine Uninstaller -> Install (top of the window) and it now all works fine. Unity runs, Mono is there and working - can attach, open to line from the log, etc.

    Awesome work on this people :)
     
  10. kakaiocesar

    kakaiocesar

    Joined:
    Jun 20, 2014
    Posts:
    1

    i've installed the ie6, i'm using wine 32bit, please help
     
  11. fjalla

    fjalla

    Joined:
    Nov 6, 2012
    Posts:
    73
    @kakaiocesar install ie8. And did you just install Unity on your desktop?

    Btw, we just need to do an official page for the scripts (like GitHub). Too many running the old version.

    Anyway, I experienced a disturbing crash while lightmapping. Do you have this problem too?
     
  12. fjalla

    fjalla

    Joined:
    Nov 6, 2012
    Posts:
    73
    https://github.com/Unity3D-Wine-Support/Unity3D-on-Wine

    As it got very confused here, and people started using old versions, etc., I made a GitHub page.

    I think only @Tomza survived from the start to the end, so probably he should be the owner. If anyone wants to be part of the GitHub group, just ask.

    Don't worry, I uploaded the scripts commit by commit, starting from the first version to the sixth. Although it's not a perfect history, I did make some mistakes while doing it.

    So, now we have an issue tracker and a wiki, jsut it's all empty, but I will start working on that as soon as I can.

    Cya there!
     
  13. krusmir

    krusmir

    Joined:
    Nov 23, 2013
    Posts:
    1
    @Doctor Jellyface Amazing work. I used your previous scripts and I had a more or less working installation (enough so that I could compile and deploy Linux and Windows builds). Now with the updated script everything runs amazing!

    I would like to add that for building android builds, I installed java and android (for windows) packages in the wine bottle, and it worked quite well, however, in the resulting apk I was having some minor graphics corruptions in some images. Now I have to test now to see if this is still the case.

    Great job again!

    edit: typos
     
    Last edited: Jun 21, 2014
  14. fjalla

    fjalla

    Joined:
    Nov 6, 2012
    Posts:
    73
    @krusmir Great! Thanks! Glad that it works :)
    *silently mouthing "you see someone else uses winetricks except me too" in @Pendrokar 's direction*

    Although you should thanks all the guys here, my script is largely based on their work.

    1: Could you specify what and from where did you install? I mean ajaa and android.
    2: Could you try running Unity with -force-opengl ? It's reported it doesn't work, but you may have luck :)

    Thanks a lot!
     
  15. stoomm

    stoomm

    Joined:
    Apr 7, 2013
    Posts:
    15
    Hi all,

    force-opengl doesn't work for me too. After some search, I found this :

    http://forums.amplitude-studios.com/archive/index.php/t-4459.html

    I'm on Debian and don't know well how patching Wine. Any idea ? ;)
     
  16. fjalla

    fjalla

    Joined:
    Nov 6, 2012
    Posts:
    73
    That kinda sucks. But anyway:

    We could modify the content of the .deb package to install the hackity Wine in /opt or something, so that way the existing installation of Wine would not be modified. I saw a guy who did this with MonoDevelop, so that the existing Mono would not be updated to prevent bugs.

    But it's a darn old version. 1.5? I run on 1.7.20. A re-package would be great, if it would work.

    But nope, I have no experience with that either.
     
  17. fjalla

    fjalla

    Joined:
    Nov 6, 2012
    Posts:
    73
    This tutorial is kanda useful, if anyone wants to try:
     
  18. WulanDesember

    WulanDesember

    Joined:
    Jun 28, 2014
    Posts:
    3
    help me! I get the message "error initializing license system"
     
  19. fjalla

    fjalla

    Joined:
    Nov 6, 2012
    Posts:
    73
    @LoseerDedi use this script. You will have no problems then.

    Btw, got Unity running with -force-opengl! It's like, 4 times faster now? Will post details soon. Thx @stoomm!
     
  20. Tomza

    Tomza

    Joined:
    Aug 27, 2013
    Posts:
    596
    Congratulations!
     
  21. stoomm

    stoomm

    Joined:
    Apr 7, 2013
    Posts:
    15
    I tried yesterday with no chance... Can't wait for details ;)
     
  22. fjalla

    fjalla

    Joined:
    Nov 6, 2012
    Posts:
    73
  23. TheSniperFan

    TheSniperFan

    Joined:
    Jul 18, 2013
    Posts:
    712
    Hey guys.
    I just wanted to say thanks to everyone involved in making Unity run with wine so good. I tried earlier and didn't really see the appeal with wine being nothing but an additional layer of potential problems.
    However, as my laptop died on me I had to migrate to my father's laptop that only runs Linux.

    I am now at the point that I think that IF this works good enough, I'll ditch Windows as a development platform and migrate my Unity work to Linux in future. Of course I'll keep Window in a VM for Debugging, but other than that I'll use Linux.
    Here's the reason in a single word: Workspaces

    That alone increases my productivity thousandfold. I have a full screen dedicated to my game- and scene-views, a full screen dedicated to the profiler and console, a full screen dedicated to the hierarchy, inspector and project-view, a full screen dedicaded to the documentation and another full screen for Kate. Oh, and then I've got two more screens for the Unity forums, VLC, Steam and other stuff that's not directly related to development.
    All of this without alt-tabbing, windows annoyingly overlapping each other and an overfilled task-bar.
    Having only two monitors I effectively have a resolution of 3280 * 5850 just for Unity. (Which I could increase even further if I needed to)
    Best. Thing. Ever. :D
     
    Last edited: Jun 29, 2014
  24. stoomm

    stoomm

    Joined:
    Apr 7, 2013
    Posts:
    15
    Hi all,

    @Doctor Jellyface : Thanks for that !

    I did the same on my Debian this WE but with no chance. Need more libraries. I'll post some details in few days for debian users.

    I tested on ubuntu. Your script work well. No pull request but :

    sudo apt-get -y install git g++ gcc-multilib g++-multilib
    sudo apt-get -y build-dep wine1.7

    Is enough. The 2 symlinks were already in place, don't know if necessary to do this in the script.

    After some tests :

    1) Without force-opengl flag, wine 1.7.21 is faster than 1.7.16
    2) With force-opengl flag, Unity is more faster :
    On bootcamp demo, the gain is between 0 and x2, depends graphics settings
    On Angry bots demo, the gain is x2
    On my game project, in 2D, the gain is approximately 20%

    Need more tests but seems good !
     
  25. WulanDesember

    WulanDesember

    Joined:
    Jun 28, 2014
    Posts:
    3
    I have now got a new problem!. pol cannot connect to the internet. pls help me...
     
  26. WulanDesember

    WulanDesember

    Joined:
    Jun 28, 2014
    Posts:
    3
    I have always failed to install wine in pol
     
  27. fjalla

    fjalla

    Joined:
    Nov 6, 2012
    Posts:
    73
    @LooserDedi:
    This thread is only for support directly on the scripts, and Unity, not a support thread for PoL. PLease remember that.

    However, I did try to update the script to Wine 1.7.21 for you, try again.




    Talking about this thread, it's time we killed it. It's too messed up. We need our own forum (subforum). Issues and improvements can be posted directly to the GitHub page.

    I'll make an idea on the Unity Feedback, to see if they are OK with a Linux Wine Editor subforum.

    Also, if everyone would add a link to the GiHub page in their signatures, that'll rock.
     
  28. fjalla

    fjalla

    Joined:
    Nov 6, 2012
    Posts:
    73
  29. Garrison

    Garrison

    Joined:
    May 7, 2014
    Posts:
    4
    Install wine in POL is as easy as 2 "clicks".
    Open POL, select tools>manage wine versions in the menu and select the wine version you want to install from the list and click the ">" button.

    PD. be sure to install the 32bit/x86 version of wine
     
  30. TheSniperFan

    TheSniperFan

    Joined:
    Jul 18, 2013
    Posts:
    712
    I just cannot get this to work.
    I got it to compile under Ubuntu 14.04 (64 bit) despite the package list being partly broken (some of them did not exists, do you use some third party PPAs?).
    However, whenever I want to run Unity in OpenGL mode using it I get the "Could not initialize Unity renderer" error.
    I am using an Nvidia card with their closed source drivers btw.
     
  31. fjalla

    fjalla

    Joined:
    Nov 6, 2012
    Posts:
    73
    @TheSniperFan :
    That might be a problem, I only tested it on 32 bit. But I'm migrating to 64 bit this week.

    Yeah, I have those errors too, I just ignore them. No third party PPAs.

    The script is basicly ripped off a tutorial, and not fine-tuned whatsoever. Please keep that in mind.

    Could you post the exact command you used to launch Unity? Thanks.

    @stoomm :
    1: This, from WineHQ speaks for itself:
    Better safe than sorry.

    2: The symlinks. Ditto.

    3:
    Respect for those benchmarks. But by the FPS Unity measured I think I might have a 4x gain. Anyway it makes Unity WAY more usable.

    BTW, everyone: a HUGE THANKS for all the feedback.
     
  32. Pendrokar

    Pendrokar

    Joined:
    Mar 26, 2011
    Posts:
    95
    Sorry for the late reply, I thought there was no activity in this thread because I got no emails. Turns out the new Forum switched it to not send emails, only notifications.

    That is what the Unity Wikia was also for, sure it would lack multiple script versions, but at least we can all have an extensive documentation made collaboratively. I guess contacting Wikia admins to create accounts is what turned you off.

    By golly this patch works, very well done! Though it was a bad idea on my part to use your script, since it thought it would be a good idea to remove my graphics driver and replace it with that default Nouvae driver.

    Very few people have 32bit Linux distros, judging from Steam statistics.

    Strange, but I have a feeling that the OpenGL version is slower for me.
    Performing benchmarks...
     
  33. TheSniperFan

    TheSniperFan

    Joined:
    Jul 18, 2013
    Posts:
    712
    Well, 32 bit desktop OS' should just die out already. Even the S***tiest hardware supports x86_64 for many years now and issues like that would be a thing of the past if people finally moved on.
     
  34. Pendrokar

    Pendrokar

    Joined:
    Mar 26, 2011
    Posts:
    95
    @TheSniperFan
    Don't worry I have x64 too and as soon as @Doctor Jellyface switches to it too, then he will feel our pain getting his methods to work.

    To compile wine with patch I used the "lxc container" method decribed here - http://wiki.winehq.org/WineOn64bit
    I did not install Unity using recompiled wine version though.


    OpenGL wasn't slower, I just had to disable VerticalSync in both NVIDIA configuration(VBlank) and in Unity Quality settings.

    -force-opengl benchmark in average Frames Per Second:
    Unity 4.5.1
    OS - Ubuntu 64 bit
    Graphics card - NVIDIA Geforce 9600GT
    With "StrictDrawOrdering" enabled (supposedly has performance costs)

    OpenGL:
    Empty scene - ~800
    AngryBots - ~110

    Direct3D to OpenGL call redirection layer (Windows Unity default):
    Empty scene - ~400
    AngryBots - ~85

    Now if only @Damian-LinuxFan (aka @DamianU3D) would share with us the registry keys needed to have Asset Store working, then we would have a fully functioning Unity editor working on Linux.

    BTW, Unity Technologies moderator added a link to the wiki in the first post. Hopefully that will stop newcomers using old install scripts.
     
    Last edited: Jul 3, 2014
  35. fjalla

    fjalla

    Joined:
    Nov 6, 2012
    Posts:
    73
    Just a quick reply before I get some time to go in-depth:

    Actually, I'm switching this week. I was only on 32 bit because of my RAM, but I think that Lubuntu is light enough to habdle 64 bit now.

    AT LAST.


    Oh and vote for The Unity Wine Subforum suggestion. That I think, is a priority now, so that we can provide real support, not one-thread.
     
  36. fjalla

    fjalla

    Joined:
    Nov 6, 2012
    Posts:
    73
    BTW this made me laugh. The irony. "Linux is not popular enough...":
     
  37. TheSniperFan

    TheSniperFan

    Joined:
    Jul 18, 2013
    Posts:
    712
    Sorry to spoil your fun, but they're absolutely right there.
    You have to look at the market share and Linux still has an awfully low one.
    They need people buying their pro license, so an open forum where everyone can vote for free hardly makes for a reliable statistic.

    Give it some time...
     
  38. TheSniperFan

    TheSniperFan

    Joined:
    Jul 18, 2013
    Posts:
    712
    This must be it.
    Considering that I couldn't install all your packages, I guess the OpenGL functionality must depend on some of the missing packages.
     
  39. Pendrokar

    Pendrokar

    Joined:
    Mar 26, 2011
    Posts:
    95
    A note to @Doctor Jellyface, as this might help when you are switching to x64. Before I compiled Wine, I tried to install Unity with your ".verb" script again. This time I just gave up on setting individual directories with 32 bit arch and made the default winearch environment variable to "win32". That worked, I am able to launch Unity with the native Wine.
     
  40. _karm

    _karm

    Joined:
    Jun 19, 2014
    Posts:
    3
    Guys, is that file sha256sum 6cf8921e00f52bbd888aa7a520a7bac47e818e2a850bcc44494c64d6cbfafdac dotnetfx3.exe safe? Aren't there any botnetish surprises?:)
     
  41. Pendrokar

    Pendrokar

    Joined:
    Mar 26, 2011
    Posts:
    95
    @_karm you mean the online checksum differs from the offline one? I though these checksum checks were more for data corruption than virus checks. Anyways I always monitor my CPU usage and I don't see any suspicious behavior while Unity is running.

    But if you still don't find it safe, you may skip it. dotNET 3 and dotNET 4 libraries are not required to run Unity. We added them because Unity uses dotNET 3.5, but @Doctor Jellyface stated that Unity ran without them.
     
  42. fjalla

    fjalla

    Joined:
    Nov 6, 2012
    Posts:
    73
    OK, finally found time for my long-ish in depth reply.

    Although, first @_karm :
    The link to the file is grabbed from the PoL source code, specifically these lines:
    Code (CSharp):
    1. # Downloading dotnet30 - official "Microsoft Download Center" link removed, using alternative Russian University link
    2. POL_Download_Resource "http://uni-smr.ac.ru/archive/win/MS%20.NET%20Framework/3.0/dotnetfx3.exe" "7b26435437e8d779ff0084d4ea96d15a" "dotnet30"
    I'm using it for 1+ months, and no problems.

    Now for the long reply. I'll try to write down everything I wanted, but didn't have time to.

    @TheSniperFan :
    How do you actually use this? I always click+drag things between views, and I like looking at everything at one time. With multiple monitors, yest, that would be cool, but on one?

    Welcome back. Strange though, I still recieved emails, even after the change without changing anything.

    Hm, I never really thought about collaborating on the Wikia. I didn't even know you needed to contact admins for an account.
    But now I'm torn between what to do. So where should we have a sort of official page?

    What about this:
    To work on the scripts, we will use the GitHub page. People who want to help can create pull requests, or submit issues.
    Although I quite like the idea of using Wikia. Maybe we could use GitHub for in-depth documentation, directly about the scripts, with all the detail, and use the Wikia to provide official instructions on how to run Unity on Wine, referencing the GitHub wiki for more info.

    Whoa, slow down! I didn't make the patch, I found it on this post (thanks @stoomm , again!), and it is on this bug report on the WineHQ.

    Talking about bug reports, we should start reporting them on WineHQ too.

    Oof, careful, you almost killed it. Pain? I need to work on Unity, I am close to releasing the beta of my game (which may as well be the first Unity on Wine developed game ever), and I need a working OpenGL Unity.


    I thought you can compile a native 64 bit Wine? (Btw, care post tips on how to do it?)

    In Unity quality settings? How?

    You don't have to. Running with the patched Wine is enough, it automatically configures the wineprefix as it needs.

    *mouth watering*

    Well, it is how it's supposed to work. I already posted instructions on that, but you probably didn't see them, cause of the emails. I'll quote it here for you:
    But thanks anyway. I'll going to need tips like this.

    You never know how many people will buy it until they get the chance. Many people buy it after the first successful (with Unity free) game. It's also the most voted idea ever, in all categories, even between the planned and released ideas. But hey, why are we losing time discussing uncontructive things like this? We've got work to do.

    Oh, and @Garrison , cool signature! Thanks!

    PS: @Pendrokar , I just realised that my first post here was utterly full of smileys. I'm so sorry. I don't know on what drugs I was, you must have thought me a complete FB noob. But it's fixed now.
     
    Last edited: Jul 7, 2014
  43. Pendrokar

    Pendrokar

    Joined:
    Mar 26, 2011
    Posts:
    95
    I could, but just to be on the safe side, I compiled it your way, the 32 bit way. Got no other tips other than what is written on winehq.

    Quality Settings -> Other -> VSync Count -> Don't Sync

    It did not help, it only decrease the warning signs by one and still caused Unity to crash on launch. You'll see, when you switch to x64.

    My first thought was actually that you know what you are doing since you didn't want to use PlayOnLinux.

    Also my compliments regarding the Wine patch was more on finding it. Of course I had the suspicion that you found the patch rather than having very in depth knowledge of Wine and OpenGL.
     
  44. fjalla

    fjalla

    Joined:
    Nov 6, 2012
    Posts:
    73
  45. TheSniperFan

    TheSniperFan

    Joined:
    Jul 18, 2013
    Posts:
    712
    2 Monitors (Laptop + one external) * 4 Workpaces = 8 Desktops to have fun on.
    Here's a screenshot of my current setup:

    The key is to use the Gnome hotkeys.
    Ctrl+Alt+Arrowkeys to switch workspaces.
    Ctrl+Alt+Shift+Arrowkeys to take the current window with you.

    (I had to set the latter up myself under Ubuntu)

    So far it runs great under Wine. The only thing that bugs me is the lack of OpenGL rendering. This laptop is a total slug already. OpenGL would make a big difference. :(
     
  46. Garrison

    Garrison

    Joined:
    May 7, 2014
    Posts:
    4
    Hi,
    i wrote a note in the wiki of github about how to install in a 64 bit system.
    That instructions worked for me, but only for execute the install process, when i tryed to open the editor i got the error about the license.

    PD. Im still using the POL method because it manages better the prefixes.
     
  47. Pendrokar

    Pendrokar

    Joined:
    Mar 26, 2011
    Posts:
    95
    @Garrison
    You need to set the registry key. This is the PlayOnLinux statement you need to execute:
    "POL_Wine reg add "HKLM\Software\Microsoft\Windows NT\CurrentVersion" /v ProductId /t REG_SZ /d 12345-oem-0000001-54321"
    Otherwise use regedit to modify the key.

    Right now that would require maintaining a Wine version of our own, compiling the new Wine version with the patch again and again like the Pipelight project does(they have a builtin version of Wine). An issue should be submited to WineHQ.

    I also made an issue at the Pipelight project, who made Unity Web Player work on native Linux Browsers. "-force-opengl" option should also increase performance for them,
     
  48. TheSniperFan

    TheSniperFan

    Joined:
    Jul 18, 2013
    Posts:
    712
    @Pendrokar
    Well, somebody has to fix the script from Doctor Jellyface to work in 64 bit installations. I was able to compile Wine, I was able to run Unity with the self-compiled version. I wasn't able to get it to work properly though since there were missing dependencies.
    The script wants you to install some packages that don't exist and I haven't been able to find all the correct counterparts by the names alone. As a result my Wine version was missing functionality that Unity required.
     
  49. Pendrokar

    Pendrokar

    Joined:
    Mar 26, 2011
    Posts:
    95
    @TheSniperFan
    There is no need for a 64 bit prefix as Unity Editor will become 64 bit only with version 5. Winetricks has compatiblity with 32 bit prefixes for now, so it is better to have Unity installed on a 32 bit prefix, unless breaking the 4 GB RAM limit is important to you.

    I did not even try to install Unity with the patched Wine, I only run Unity with it. I believe there were two libraries that I did not have when I compiled Wine, but they did not seem important.
    1. So first I set the default WINEARCH environment variable to win32("export WINEARCH=win32"), so no more errors regarding 64 bit would be thrown by winetricks.
    2. Then I ran winetricks on the script "winetricks -q ./unity.verb", which uses the native/vanilla Wine.
     
  50. TheSniperFan

    TheSniperFan

    Joined:
    Jul 18, 2013
    Posts:
    712
    @Pendrokar
    I meant hat this script doesn't work under a x86_64 Linux installation. Some of the packages simply aren't available. I was able to compile Wine just fine and could run Unity, but it gave me the "Failed to initialize renderer" error.
    This means I cannot use -force-opengl on Ubuntu 64 bit.