Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Question Building for Windows on Linux

Discussion in 'Linux' started by Steljoy, Aug 22, 2023.

  1. Steljoy

    Steljoy

    Joined:
    Oct 16, 2018
    Posts:
    8
    Hi, I am a long time Linux user, and I have been using Unreal Engine for a couple years for work, this year I decided to make my own game and I switched to unity for it.

    My game is now nearly complete (made entirely on Linux using the Unity Editor + Rider) and I am getting closer and closer to needing to build windows version of the game and testing it.

    Here is the question, how reliable is the build process of the game on the Linux version of the editor? Are there any downsides to building a .exe version of the game on Linux? As I understand, Unity on Linux only supports builds with Mono?

    Would it be better to dual boot windows for the build process? I also have a MacBook, would it be more ideal to build it on the MacBook?

    I have already built my game's .exe and tested under wine and works perfectly fine, but I am just curious if anyone has more experience or technical knowledge.

    TLDR: I think its best if I just build the game on windows and test it there, but curious to see how reliable building .exe version of the game is on Linux

    Many thanks!
     
    Last edited: Aug 22, 2023
  2. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,503
    Mono builds should produce identical outputs as builds on Windows.

    The only drawback of this is that you cannot use IL2CPP.
     
    Steljoy and karliss_coldwild like this.
  3. karliss_coldwild

    karliss_coldwild

    Joined:
    Oct 1, 2020
    Posts:
    530
    I have been building for Windows, macOS and Linux from Linux using mono for roughly 2 years without any issues. At least for the subset of Unity features that I use.

    Much smaller chance to make a human error if you have a script that builds everything at once instead of going through the process 3 time. It also avoids the hassle of buying more seats or switching single license between multiple computer. If I remember correctly single paid license (don't know about the free ones) can be activated on 2 computers at the same time, which annoyingly is one less than amount of desktop operating systems.

    If you decide to build everything from Linux, you should still have a real installation of Windows and macOS for testing and debugging any platform specific issues. Not sure how helpful testing in Wine is. Problems caused by subtle differences in desktop behavior which weren't already handled by Unity platform abstractions, might as well have differences between wine and Windows. Stuff like the way resolution changing works, multiple desktops, OS event ordering. I guess it would still be useful for catching issues due to differences between Unity DirectX and OpenGL backends.

    I was wondering about burst. Looking at docs seems like it was a problem for older Burst versions, but in the later versions it directly says that it is supported now.
     
    Steljoy likes this.
  4. Steljoy

    Steljoy

    Joined:
    Oct 16, 2018
    Posts:
    8
    Exactly what I needed, thank you very much!
     
  5. Steljoy

    Steljoy

    Joined:
    Oct 16, 2018
    Posts:
    8
    I am extremely grateful for the in-depth response; it is great to hear from someone who has had actual experience building on Linux, puts me at ease using it. You have cleared up so much for me here, it is invaluable.

    I will have to test it on Windows for sure, and I do have a laptop that I don't use often and can install Windows there to test it.

    Once again, thank you for your time!