Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    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
  2. TheSniperFan

    TheSniperFan

    Joined:
    Jul 18, 2013
    Posts:
    712
    I hope it really works now.
    Compiling...

    EDIT:
    Nope. Doesn't work.
    install-wine-deps.sh ends with

    Code (csharp):
    1. Die folgenden Pakete haben unerfüllte Abhängigkeiten:
    2. libjack-dev : Hängt ab von: libjack0 (= 1:0.121.3+20120418git75e3e20b-2.1ubuntu1) soll aber nicht installiert werden
    3. E: Probleme können nicht korrigiert werden, Sie haben zurückgehaltene defekte Pakete.
    4. + uname -m
    5. + test x86_64 = x86_64
    6. + echo I do not know how to install 32 bit libraries for distro Ubuntu
    7. 14.04 yet
    8. I do not know how to install 32 bit libraries for distro Ubuntu
    9. 14.04 yet
    So libjack-dev cannot be installed and the script doesn't know how to install the libraries for 14.04 yet. The terminal output is more interesting though.
    When running Unity I get the usual "Failed to initialize renderer" error (even when not running with -force-opengl) and my terminal gets spammed with this message:
    Code (csharp):
    1. err:wincodecs:PngEncoder_CreateInstance Trying to save PNG picture, but PNG support is not compiled in.
    2. fixme:ole:CoCreateInstance no instance created for interface {00000103-a8f2-4877-ba0a-fd2b6645fb94} of class {27949969-876a-41d7-9447-568f6a35a4dc}, hres is 0x80004005
    3. err:menubuilder:convert_to_native_icon error 0x80004005 creating bitmap encoder
    EDIT 2:
    Since this is a real show-stopper for me and it looks like I will be forced to use this machine quite a bit longer, I'll try a different distribution. It seems like Canonical screwed up some dependencies when it comes to compile 32 bit applications under 64 bit versions of Ubuntu.
    Next stop: Fedora! :D
     
    Last edited: Jul 8, 2014
  3. fjalla

    fjalla

    Joined:
    Nov 6, 2012
    Posts:
    73
    @TheSniperFan strange. The script looks like it does support 64 bit Ubuntu. I just compiled Wine with it without any problems.

    We'll see if @Pendrokar has any luck with his methods.

    Also, look at this, this and this.

    BTW, updated the script with some fixes, it might work better now.
     
  4. fjalla

    fjalla

    Joined:
    Nov 6, 2012
    Posts:
    73
    I created a torrent with mine pre-compiled and patched wine, feel free to download. Link in attachment, but you need to rename it from wine-git.torrent.txt to wine-git.torrent.
     

    Attached Files:

  5. TheSniperFan

    TheSniperFan

    Joined:
    Jul 18, 2013
    Posts:
    712
    @Doctor Jellyface
    I have now done the best thing: Dualboot Ubuntu 14.04 x86 and it works just fine.

    You should make clear that this script only works under 32 bit Linux installations so far. It seems that Canonical doesn't provide all the 32 bit counterparts to the 64 bit development packages. There is no 32 bit libpng-dev package for Ubuntu.
    Here's an interesting quote for you:
    I can safely confirm this.

    I had somewhat more luck with Fedora 20 as the compiled wine version was able to run Unity. Using the -force-opengl option just caused Unity to crash though.
     
  6. fjalla

    fjalla

    Joined:
    Nov 6, 2012
    Posts:
    73
    @TheSniperFan
    So you won't be using the torrent then? I can leave the computer running in the night if you want.

    Well, I renamed the script to compile-wine-ubuntu-32bit.sh.

    (Although, do check out the torrent I gave you. Unity should work with -force-opengl with it perfectly.)
     
  7. Pendrokar

    Pendrokar

    Joined:
    Mar 26, 2011
    Posts:
    95
    @TheSniperFan
    You are going to switch a distro, just because you can't get Unity running with "-force-opengl"? It is just a recent discovery that we are even able to get it working. It is only a matter of in-editor performance. Unity is still usable without it.

    ??? I don't know what you are waiting on me for. I did not use your compile script... well maybe a few lines(the patch), but for downloading the source code and compiling Wine I used the WineOn64bit tutorial. With the methods described there, it doesn't seem easy to create a script that would guarantee getting a Wine version that is able to launch Unity with -force-opengl.
     
  8. stoomm

    stoomm

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

    Sorry if I take time to post some news, I received my new PC ;)

    So, on my LMDE (Debian based), I use the instructions from WineOn64bit, like pendrokar. Sid solution work well on it (without the hal library).

    I'm experimenting 3 bugs :

    1) Can't debug (tested on 3 others PC, same problem)
    2) In monodevelop, can't insert curly brackets, ... ( { } | ) : (tested on 3 others PC, same problem). I've read it's a GTK bug (I'm french, so french layout)
    3) On my new PC, I experiment this know bug on the wiki page : NVIDIA: Unity does not refresh windows often enough, but with the -force-opengl flag (ok in directx mode). I don't have this on my ubuntu PC. So, I need more tests, but if anyone have an idea ...

    - Ubuntu PC : Intel HD 4000, mesa 9.2.1
    - LMDE PC : Intel HD 4600, mesa 9.2.2

    Thanks ;)
     
  9. TheSniperFan

    TheSniperFan

    Joined:
    Jul 18, 2013
    Posts:
    712
    My proper development machine is currently being repaired and I won't get it for at least two more weeks.
    The laptop I'm working on right now is so damn slow, I would switch distributions if it meant 5 more frames per second on average.
    Besides that I didn't really switch. I dualboot two sytems now. One main system and one for working with Unity. After verifying that Unity works in OpenGL mode I just moved my old wineprefixes for SketchUp and World Machine over. Setting up my machine for development again only was like 1 hour of actual work (installing drivers, replacing bash with zsh, installing git and so forth). Most of the time stuff was compiling/downloading/installing so I was just waiting.

    @Doctor Jellyface
    I won't need your torrent since I've got a perfectly working development system already. Everything is set up and I can go back to work agian. (At last)
    Thanks anyway. :)

    @stoomm
    Which version of MonoDeveolop do you use? The one that comes with Unity through Wine, or the native package of your distribution?
    If you can do without auto-completion, you can use other native editors too. I use Kate for example.
     
  10. stoomm

    stoomm

    Joined:
    Apr 7, 2013
    Posts:
    15
  11. TheSniperFan

    TheSniperFan

    Joined:
    Jul 18, 2013
    Posts:
    712
    I just tried here. I can attach the debugger but as soon as I want to use breakpoints Unity freezes on me. Maybe someone else can shed some light on this issue.
    It would be cool if it worked, although I don't have a problem with the lack of it. If I really needed it, I'd use a VM in the worst case.

    For editing I highly recommend you to use a native editor. MonoDevelop's font rendering alone is enough for me to not even considering it.
     
  12. stoomm

    stoomm

    Joined:
    Apr 7, 2013
    Posts:
    15
  13. TheSniperFan

    TheSniperFan

    Joined:
    Jul 18, 2013
    Posts:
    712
    Okay guys, I probably found a new bug.
    When using the patched Wine and running Unity in OpenGL mode, the mouse bugs out when using Screen.lockCursor.
    In DX mode it works fine.
    It's kind of weird. The cursor is locked and I can turn around completely. The issue is that the when I want to look down, I look down and turn. The movement is off. It's also nowhere near as smooth as it should be.

    It would be cool if someone of you would check that and possibly confirm the bug.
     
  14. fjalla

    fjalla

    Joined:
    Nov 6, 2012
    Posts:
    73
    @TheSniperFan strange. Looks like the OpenGL version is much more bugged up. For example my Editor GUI doesn't refresh often enough, and I'm not using nVidia. DX mode- fine.

    I must file a bug report with the patch upstream.
     
  15. TheSniperFan

    TheSniperFan

    Joined:
    Jul 18, 2013
    Posts:
    712
    Could you check whether your mouse behaves correctly when using Screen.lockCursor?
     
  16. Pendrokar

    Pendrokar

    Joined:
    Mar 26, 2011
    Posts:
    95
    Interesting, I experience the same, so it might not be an NVIDIA bug after all. Setting StrictDrawOrdering no longer helps me on -force-opengl too.


    User "RevenantX" mentions something regarding the native editor on his test for AppDB:
    Source
     
  17. EdgarAllen

    EdgarAllen

    Joined:
    Jul 5, 2011
    Posts:
    2
    Does beast lightmapping work for you guys? I'm running 4.5.0f6 on Ubuntu 13.04 and the editor silently crashes when I try to bake lightmaps. Can't find any logs or causes for the crash.
     
    Last edited: Jul 16, 2014
  18. Pendrokar

    Pendrokar

    Joined:
    Mar 26, 2011
    Posts:
    95
    @EdgarAllen
    I and @Doctor Jellyface can confirm that indeed Beast lightmapping engine crashes. But since I don't need to lightmap yet, I haven't searched for a solution.


    Regarding the Asset Store. If I understand this correctly, when an application tries to embed web pages, Wine uses its own version of Internet Explorer, which uses a custom Gecko Layout Engine. But by installing Internet Explorer 8, we may have overridden that web engine.
    Source - http://wiki.winehq.org/Gecko
     
  19. willtheoct

    willtheoct

    Joined:
    Jul 19, 2014
    Posts:
    4
    Hello!
    Any news on the mscorsvw.exe problem?
    (Edit: I now realize this might not be an mscorsvw.exe problem, since there are 2 DLLs that failed to load)

    I'm using this PlayOnLinux script:
    Code (JavaScript):
    1. #!/bin/bash
    2. # Date : (2014-03-07 10-21)
    3. # Last revision : (2014-03-07 10-21)
    4. # Wine version used : 1.7.22
    5. # Distribution used to test : OpenSuse 13.1
    6. # Authors : waneck-six, Damian-LinuxFan, Tomza (pogtoma@gmail.com), gnumaru, Doctor Jellyface (doctorjellyface@riseup.net)
    7. # Contributors: Goran Grncaroski (running MonoDevelop), other people (testing solutions)
    8. # Script licence : GPL v.2
    9. # Only For : http://www.playonlinux.com
    10. # Depend :
    11. # Known Issues : You can't use Asset Store
    12. [ "$PLAYONLINUX" = "" ] exit 0
    13. source "$PLAYONLINUX/lib/sources"
    14. TITLE="Unity 3D with MonoDevelop"
    15. PREFIX="Unity3Dwithmono"
    16. WINE_VERSION="1.7.22"
    17. POL_SetupWindow_Init
    18. POL_Debug_Init
    19. POL_SetupWindow_presentation "$TITLE" "Unity" "http://www.unity3d.com/" "waneck-six, Damian-LinuxFan, Tomza, gnumaru, DoctorJellyface" "$PREFIX"
    20. #create prefix
    21. export WINEARCH="win32"
    22. POL_Wine_SelectPrefix "$PREFIX"
    23. POL_Wine_PrefixCreate "$WINE_VERSION"
    24. #setup prefix
    25. POL_Wine_InstallFonts
    26. POL_Call POL_Install_directx9
    27. POL_Call POL_Install_dotnet20
    28. POL_Call POL_Install_dotnet35
    29. POL_Call POL_Install_dotnet40
    30. POL_Call POL_Install_tahoma
    31. POL_Call POL_Install_vcrun2008
    32. POL_Call POL_Install_vcrun2010
    33. POL_Call POL_Install_mono210
    34. POL_Call POL_Install_d3dx9_36
    35. POL_Call POL_Install_d3dcompiler_43
    36. POL_Call POL_Install_dxdiag
    37. POL_Call POL_Install_dxfullsetup
    38. POL_Call POL_Install_physx
    39. POL_Call POL_Install_corefonts
    40. POL_Call POL_Install_msxml6
    41. POL_Call POL_Install_wininet
    42. POL_Call POL_Install_ie8
    43. #Setting OS wer
    44. Set_OS "winxp" "sp3"
    45. #Setting mono forcing in MonoDevelop
    46. POL_Wine_OverrideDLL “native, builtin” “mscore”
    47. POL_Wine_OverrideDLL “builtin, native” “dnsapi”
    48. POL_Wine_OverrideDLL "" "mscorsvw.exe"
    49. mkdir -p $WINEPREFIX/drive_c/users/$USER/AppData/LocalLow
    50. #registry
    51. POL_Wine reg add "HKLM\Software\Microsoft\Windows NT\CurrentVersion" /v ProductId /t REG_SZ /d 12345-oem-0000001-54321
    52. POL_SetupWindow_browse "Please select the location of the Unity3D setup executable" "$TITLE"
    53. UNITYLOC=$APP_ANSWER
    54. POL_Wine $UNITYLOC
    55. POL_Shortcut "Unity.exe" "$TITLE"
    56. POL_SetupWindow_Close
    57. exit
    and getting this error output:

    Code (CSharp):
    1. [07/19/14 00:29:44] - Running wine-1.7.22 Unity.exe (Working directory : /home/william/.PlayOnLinux/wineprefix/Unity3Dwithmono/drive_c/Program Files/Unity/Editor)
    2. wine: cannot find L"C:\\windows\\Microsoft.NET\\Framework\\v4.0.30319\\mscorsvw.exe"
    3. fixme:service:scmdatabase_autostart_services Auto-start service L"clr_optimization_v4.0.30319_32" failed to start: 2
    4. err:module:import_dll Library DNSAPI.dll (which is needed by L"C:\\Program Files\\Unity\\Editor\\Unity.exe") not found
    5. err:module:LdrInitializeThunk Main exe initialization for L"C:\\Program Files\\Unity\\Editor\\Unity.exe" failed, status c0000135
    System info: Wine 1.7.22
    GPU: gt630m(or possibly just intel, idk, NVIDIA drivers are wonky)
    Distro: Ubuntu 14.04
    I can run Unity just fine when i use the original script by Cauê Waneck too, so it can't be GPU related.



    I tried Doctor JellyFace's latest script on github too, but all it says in terminal is:
    wine cmd.exe /c echo '%ProgramFiles%' returned empty string
     
    Last edited: Jul 20, 2014
  20. CptTeacup

    CptTeacup

    Joined:
    Jul 19, 2014
    Posts:
    11
    Arch users: make sure you install lib32-libldap

    Got 4.5.2 running with WINE 1.7.22 on Arch using the POL script from the wiki. I'll let you know how it runs later.
     
  21. willtheoct

    willtheoct

    Joined:
    Jul 19, 2014
    Posts:
    4
    Fixed my problem, not sure exactly how...
    Using the latest github script(rev 7), commented out the lines
    Code (CSharp):
    1. #Setting mono forcing in MonoDevelop
    2. #POL_Wine_OverrideDLL "native, builtin" "mscore"
    3. #POL_Wine_OverrideDLL "builtin, native" "dnsapi"
    4. #POL_Wine_OverrideDLL "" "mscorsvw.exe"
    Which still gave me the same error.
    Then, I went to PlayOnLinux>Configure Wine, and removed dnsapi from the list of overrides. Not sure how any of this makes sense, but that's what I did step for step.
     
  22. Pendrokar

    Pendrokar

    Joined:
    Mar 26, 2011
    Posts:
    95
    @willtheoct not disabling "mscorsvw" fixes the
    'wine: cannot find L"C:\\windows\\Microsoft.NET\\Framework\\v4.0.30319\\mscorsvw.exe"'
    issue for me, though I experience no change in Unity. This error pops up even if you launch "winecfg".

    But since it is disabled for the purpose of "#Setting mono forcing in MonoDevelop", which I do not use, then I don't know how important it is. And whenever the line should be removed for the script.

    ---

    @CptTeacup is that library required to install Wine or Unity on Arch Linux?
     
    Last edited: Jul 20, 2014
  23. Bojidar

    Bojidar

    Joined:
    Apr 28, 2014
    Posts:
    4
    Running under Ubuntu 14.04 like a charm.
    Here is a script, for the replacement of ie (the only component not working on my machine):
    Code (CSharp):
    1. #!/bin/bash
    2. if [ -z "$1" ]
    3. then
    4.     echo "No file specified"
    5.     exit 1
    6. fi
    7. FILE="$@"
    8. FILE="`wine winepath -u "$FILE"`"
    9. FILE=${FILE/\.wine/".PlayOnLinux/wineprefix/Untity3D_1"}
    10.  
    11. x-www-browser --new-tab-page-1 "$FILE"
    12.  
    13. exit 0
    To use it, replace all "iexplore.exe" with a symlink to this script.
     
  24. Pendrokar

    Pendrokar

    Joined:
    Mar 26, 2011
    Posts:
    95
    @Bojidar
    Is this only for opening Unity's scripting reference and manual? Or does this even fix the Asset Store?

    I tried changing my default browser, but I believe after a 'wineboot' it now always crashes when opening manuals.
     
  25. Pendrokar

    Pendrokar

    Joined:
    Mar 26, 2011
    Posts:
    95
    Interesting when looking at Unity Answers, a lot of Windows and Mac users encounter the same issue with the Asset Store. Contents not showing can be even due to not being authenticated to the Asset Store. Though in most cases it is the fault of "Use Direct3D 11", which makes little sense.
     
  26. Bojidar

    Bojidar

    Joined:
    Apr 28, 2014
    Posts:
    4
    @Pendrokar
    It is only for the scripting reference and the manual, not working for the asset store.
     
  27. Pendrokar

    Pendrokar

    Joined:
    Mar 26, 2011
    Posts:
    95
  28. CptTeacup

    CptTeacup

    Joined:
    Jul 19, 2014
    Posts:
    11
    Apparently I can't save anything, so that's an issue.

    Edit: Solved, Wine needs to be in Windows XP mode. I think it would be good to add this to the wiki.

    It's needed for Unity since it's 32-bit. There are several 32-bit packages that need to be installed in order for Unity to work, but I'm not sure what they all are since I already had most of them. I think they are all optional dependencies for Wine.
     
    Last edited: Jul 24, 2014
  29. fjalla

    fjalla

    Joined:
    Nov 6, 2012
    Posts:
    73
    Eh, what? I mean, that's just a path translation script from what I see.



    Also, migrating to 64 bit today, wish me good luck.
     
  30. dehen_

    dehen_

    Joined:
    Sep 30, 2012
    Posts:
    8
    Last edited: Jul 27, 2014
  31. dehen_

    dehen_

    Joined:
    Sep 30, 2012
    Posts:
    8
    Also, this might sound really silly and obvious, but to anyone reporting lag in pane-refresh with nvidia, make sure to go into your nvidia control panel, and set powermizer to prefer max performance.
     
  32. Pendrokar

    Pendrokar

    Joined:
    Mar 26, 2011
    Posts:
    95
    @dehen_ I guess that only helps the Direct3D mode, the default mode, not OpenGL. But it seems to be a better option than the "Strict Draw Ordering" option.
     
  33. CptTeacup

    CptTeacup

    Joined:
    Jul 19, 2014
    Posts:
    11
    It seems to be running quite well, including the built-in version of MonoDevelop. It's a bit finicky in a tiling wm, but not too bad.
     
  34. willtheoct

    willtheoct

    Joined:
    Jul 19, 2014
    Posts:
    4
    Ok, new "convenience" problem: Unity can't find blender to import .blend files. So far, I've tried installing blender through POL via the "Install a Program" button, and then running the blender 2.71 install EXEs(both 64 and 32 bit). The 32-bit runs through the virtual drive, but Unity still can't find blender. Thoughts?

    Yes, I know, I can export to FBX, but I'd rather not need to tell Unity that I need all of my models imported at 100% size instead of 1%.
     
  35. Justice_Developer

    Justice_Developer

    Joined:
    Mar 23, 2014
    Posts:
    13
    AMAZING!

    It was a long and hard road, manually installing some winetricks because POL couldn't make it (.net 3.0 e.g.)

    But now it works. and I mean it actually works!
    I am totally amazed. This script is an amazing learning resource.

    I can play around with the AngryBot s example and learn more about Unity on my own PC.

    At work I (have to) use a mac and at home I don't have windows.
    So this is a perfect solution for me to learn more about unity while being at home.
     
  36. Mike4

    Mike4

    Joined:
    Oct 24, 2013
    Posts:
    92
    Seems ok but I cannot edit scripts with Monodevelop from Linux. I get something alike:

    unrecognized project: Assembly-UnityScript.unityproj
    etc.

    Any help with that would be great.
    Thanks
     
  37. willtheoct

    willtheoct

    Joined:
    Jul 19, 2014
    Posts:
    4
    There's a replacement for .net, called Mono. The script normally installs this, but if for whatever reason POL doesn't work, POST YOUR ERROR HERE! WE NEED IT!
    And then, you can look up your error and look into Mono.

    Linux's Monodevelop won't open unity projects. Maybe if you can get Monodevelop 5's source code compiled and fix the dependencies(it can be done), it can open Unity projects.

    Instead, use the windows version of MonoDevelop. Assuming you used the Latest script on Github, and had no problems, you can create a new script in Unity, open it, and it will automatically launch MonoDevelop, using your Unity project.
     
  38. Mike4

    Mike4

    Joined:
    Oct 24, 2013
    Posts:
    92
    No, I've installed it manually by simply checking the deps from this script. So I've installed pol but executing this script
    I get:
    michael@michael-ubuntu:~/Desktop$ ./plonL*
    ./plonLUnity: line 15: [: missing `]'
    ./plonLUnity: line 16: /lib/sources: No such file or directory
    ./plonLUnity: line 22: POL_SetupWindow_Init: command not found
    ./plonLUnity: line 23: POL_Debug_Init: command not found
    ./plonLUnity: line 25: POL_SetupWindow_presentation: command not found
    ./plonLUnity: line 29: POL_Wine_SelectPrefix: command not found
    ./plonLUnity: line 30: POL_Wine_PrefixCreate: command not found
    ./plonLUnity: line 33: POL_Wine_InstallFonts: command not found
    ./plonLUnity: line 34: POL_Call: command not found
    ./plonLUnity: line 35: POL_Call: command not found
    ./plonLUnity: line 36: POL_Call: command not found
    ./plonLUnity: line 37: POL_Call: command not found
    ./plonLUnity: line 38: POL_Call: command not found
    ./plonLUnity: line 39: POL_Call: command not found
    ./plonLUnity: line 40: POL_Call: command not found
    ./plonLUnity: line 41: POL_Call: command not found
    ./plonLUnity: line 42: POL_Call: command not found
    ./plonLUnity: line 43: POL_Call: command not found
    ./plonLUnity: line 44: POL_Call: command not found
    ./plonLUnity: line 45: POL_Call: command not found
    ./plonLUnity: line 46: POL_Call: command not found
    ./plonLUnity: line 47: POL_Call: command not found
    ./plonLUnity: line 48: POL_Call: command not found
    ./plonLUnity: line 49: POL_Call: command not found
    ./plonLUnity: line 50: POL_Call: command not found
    ./plonLUnity: line 53: Set_OS: command not found
    ./plonLUnity: line 56: POL_Wine_OverrideDLL: command not found
    ./plonLUnity: line 57: POL_Wine_OverrideDLL: command not found
    ./plonLUnity: line 58: POL_Wine_OverrideDLL: command not found
    mkdir: cannot create directory ‘/drive_c’: Permission denied
    ./plonLUnity: line 63: POL_Wine: command not found
    ./plonLUnity: line 65: POL_SetupWindow_browse: command not found
    ./plonLUnity: line 68: POL_Wine: command not found
    ./plonLUnity: line 70: POL_Shortcut: command not found
    ./plonLUnity: line 72: POL_SetupWindow_Close: command not found
    michael@michael-ubuntu:~/Desktop$
    michael@michael-ubuntu:~/Desktop$ echo $PLAYONLINUX

    michael@michael-ubuntu:~/Desktop$

    Thanks for help with pol. If I try to execute monodevelop windows version with my
    install i get lots of missing dlls.
     
  39. Bojidar

    Bojidar

    Joined:
    Apr 28, 2014
    Posts:
    4
    I am able to open unity projects with Monodevelop(Ubuntu) 4.0.12. I installed add-ins from the Unity section in the gallery, and the Sorce Editor Extentions->Unity Mimetypes. Then wrote a script to fix the dependecies of the csproj:
    Code (CSharp):
    1. if [ -z "$1" ]
    2. then
    3.     echo "No file specified"
    4.     exit 1
    5. fi
    6.  
    7. FILE="`wine winepath -u "$1"`"
    8. #This line fixes the path, so it would look in the Pol folder, not in the wine folder
    9. FILE=${FILE/\.wine/".PlayOnLinux/wineprefix/Untity3D"}
    10.  
    11. F_DIR=${FILE%/*}
    12. F="$F_DIR/*.csproj"
    13.  
    14. #change .PlayOnLinux/wineprefix/Untity3D if needed
    15. sed -i 's$<HintPath>C:/Program Files/Unity/Editor/Data/Managed/UnityEngine.dll</HintPath>$<HintPath>/home/bobo/.PlayOnLinux/wineprefix/Untity3D/drive_c/Program Files/Unity/Editor/Data/Managed/UnityEngine.dll</HintPath>$g'  $F
    16. #change .PlayOnLinux/wineprefix/Untity3D if needed
    17. sed -i 's$<HintPath>C:/Program Files/Unity/Editor/Data/Managed/UnityEditor.dll</HintPath>$<HintPath>/home/bobo/.PlayOnLinux/wineprefix/Untity3D_1/drive_c/Program Files/Unity/Editor/Data/Managed/UnityEditor.dll</HintPath>$g' $F
    18. #Cannot find a way to make monodevelop open the file
    19. #If you know one insert it here:)
    To use this code: in Unity->Edit->Preferences->External Tools->External Script Editor set it to the path to the .sh file(it must be executable).
    Then after adding/removing a script or at creation of the project use Sync Monodevelop Project and start monodevelop. From it open your <Project>.sln, and it works(hopefully).
     
  40. Bojidar

    Bojidar

    Joined:
    Apr 28, 2014
    Posts:
    4
    From 4.5.2 Fixes:
    • Editor : Fixed Asset Store window showing up blank in DirectX 11 mode on some laptop graphics cards
     
  41. Pendrokar

    Pendrokar

    Joined:
    Mar 26, 2011
    Posts:
    95
    .pol scripts are not Bash/Shell scripts, only PlayOnLinux may run these scripts.

    I see, but 4.5.2 doesn't have any effect for a Wine installation of Unity, I already tested it with Wine 1.7.23+(git).

    ---

    Also good news everyone, the bug that made the scene disappear when hitting "Play" may have been fixed in Wine itself. For now there is only one confirmation. Note that this fix is not in 1.7.23 version of Wine. Of course it wasn't a big bug, as it only required creating a folder.
    http://bugs.winehq.org/show_bug.cgi?id=22896
     
  42. Pinterac

    Pinterac

    Joined:
    Aug 6, 2014
    Posts:
    3
    Hello,

    I just installed Unity using the POL script and I get this error when I launch Unity from POL.

    Code (Javascript):
    1. wine: cannot find L"C:\\windows\\Microsoft.NET\\Framework\\v4.0.30319\\mscorsvw.exe"
    2. fixme:service:scmdatabase_autostart_services Auto-start service L"clr_optimization_v4.0.30319_32" failed to start: 2
    3. err:module:import_dll Library DNSAPI.dll (which is needed by L"C:\\Program Files\\Unity\\Editor\\Unity.exe") not found
    4. err:module:LdrInitializeThunk Main exe initialization for L"C:\\Program Files\\Unity\\Editor\\Unity.exe" failed, status c0000135
    5.  
    I tried to reinstall the module dotnet40 but the error still remain.

    Any idea?

    Thanks in advance

    EDIT: I searched for mscorsvw.exe and in fact, it is not present in the directory.

    Config:
    Linux Mint 17
    Wine 1.7.23 used with POL
    Arch x64
     
    Last edited: Aug 6, 2014
  43. Pendrokar

    Pendrokar

    Joined:
    Mar 26, 2011
    Posts:
    95
    @Pinterac
    You shouldn't worry about "mscorsvw.exe", some winetricks's component(seems forcemono) disables it in winecfg, but this error pops even in a working Unity. It can be fixed, by renabling it in winecfg, error will disappear, but I doubt it will fix your issue.

    It is the first time I seen that particular issue.
     
  44. Pinterac

    Pinterac

    Joined:
    Aug 6, 2014
    Posts:
    3
    @Pendrokar

    Since I have enabled dnsapi and mscorsvw on winecfg inside POL, Unity starts correctly.

    Thanks a lot!
     
  45. Mike4

    Mike4

    Joined:
    Oct 24, 2013
    Posts:
    92
    The script works out of the box on Ubuntu 14.04. Many thanks, even Monodevelop is fully working.
     
  46. Mike4

    Mike4

    Joined:
    Oct 24, 2013
    Posts:
    92
    Hmm anybody can debug with monodevelop?
     
  47. fjalla

    fjalla

    Joined:
    Nov 6, 2012
    Posts:
    73
    Oh, looks like this time MY email notifications stopped. Oops. Sorry.
     
  48. Pendrokar

    Pendrokar

    Joined:
    Mar 26, 2011
    Posts:
    95
  49. dragontorchslash

    dragontorchslash

    Joined:
    Sep 19, 2013
    Posts:
    3
    Hi everyone, I currently ran through installing unity 3d on ubuntu 14.04 through the playonlinux method. It works pretty well for me! It occasionally crashes, but not much. I do have a question though. I have a script that needs to reference a folder. Since our path is different, how would I reference a folder? I can give you the path,
    /home/djfrost/.PlayOnLinux/wineprefix/Unity3D/drive_c/users/djfrost/My Documents/MortalSun/Assets/Movies/BattleIntro1
    However, I tried with using this path, and cutting a folder off the beginning each time it didnt work. So for example, my second try would have been,
    /djfrost/.PlayOnLinux/wineprefix/Unity3D/drive_c/users/djfrost/My Documents/MortalSun/Assets/Movies/BattleIntro1
    until there was nothing left and none of the paths worked. So does it look under a different folder? Or do I need to move my project elsewhere? By the way thanks everyone who helped, and is helping with getting unity 3d on linux it saved me because I don't have windows anymore due to hard drive failure.
     
  50. Pendrokar

    Pendrokar

    Joined:
    Mar 26, 2011
    Posts:
    95
    @dragontorchslash
    First of all, by script, do you mean a script of Unity? If yes, then the script should have the relative path from Assets folder.

    If it is a shell/bash script, then make sure you have quotes around it.

    And the following information may be of use. Wine has a program called "winepath" it changes a Windows filepath given by Wine to a Unix absolute path. you can call it with 'wine winepath', if you have a native version of Wine installed.