Search Unity

Write code in Mac and Windows

Discussion in 'General Discussion' started by games28, Feb 9, 2020.

  1. games28

    games28

    Joined:
    Dec 31, 2014
    Posts:
    32
    Id like to hire a company to make a game for me in Unity for Windows and Mac environment. I'm trying to figure out the cost of the game. When a programmer writes the code for the game to run in windows obviously he uses a windows PC. Then does he write the code from the start in a Macintosh computer to make it run in mac? If that's the case then the cost would be much more. Or does Unity provide the tools needed to turn a code written in windows into a code for Mac? I know it might be a silly question but for me who is a beginner is not.
     
  2. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    21,190
    No. Unity will automatically translate the code you've written to run on the platform you ask it to make a build for. That said every platform has features that are only available for that platform and code intended to take advantage of those features won't be translated.
     
    Joe-Censored and neginfinity like this.
  3. newjerseyrunner

    newjerseyrunner

    Joined:
    Jul 20, 2017
    Posts:
    966
    The point of tools like Unity is to provide a framework to make the OS invisible to the programmer. Very little custom code will need to be written for one version or the other.
     
  4. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    11,847
    You can create the project on Windows, Mac, or even the Linux version of the Unity Editor. Doesn't matter. What matters is when you produce the final build. Both Windows and Mac can make mono builds for the other platform, but to make an IL2CPP build for Windows you have to use the Windows editor. For an IL2CPP build for Mac you need XCode which requires a Mac. If you are fine with Mono builds then I don't think it matters where you produce it.

    IL2CPP offers theoretical performance benefits (depends on what you do in your project if you get real world performance improvement), and its nature helps a bit with source code obfuscation. Otherwise Mono builds are fine.

    Alternatively you could use Unity's cloud build service, but I'm sure that costs money. Haven't checked.