Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice

Question Building to MacOS from windows is dark and super slow (and more)

Discussion in 'macOS' started by JudahMantell, Nov 14, 2021.

  1. JudahMantell

    JudahMantell

    Joined:
    Feb 28, 2017
    Posts:
    476
    Hey there!
    First off, I apologize for the rant-y-ness of this post--this issue is driving me crazy, lol.

    I've been working on a Unity Project on my PC for a long time and all is working well (currently using 2021.1.28 because any 2021.2 version crashes on startup for me -- latest Firebase google-jar-resolver isn't compatible yet because of a Unity bug!).
    But, I want to put my app on Mac (Apple Silicon), but I'm running into a bunch of issues that maybe someone can help me with.

    To avoid having to transfer my Unity project back and forth between devices (PC + M1 Air), I figured I'd just make a MacOS build on my PC and transfer the .app for testing. The problem is, when I do that, and try to run the application on Mac, all of the UI is much darker than it's supposed to be, and the whole thing lags like crazy--to the point that I have to wait a full 10 seconds for a button press to be registered.
    I don't think this is an optimization issue -- I'm using URP and my project consists of mostly UI and empty 3D scenes(ish), so I think it should run fine on M1 devices.

    The other option is to transfer the Unity Project and test/build in the Mac editor. Good idea! But any time I try to run my project on my macbook (same editor version), the editor UI gets all messed up and becomes unusable.
    If I try updating to 2021.2 on the Mac, same issue--crashes on startup. And because of bugs with unity Hub, I can't even use the Apple-Silicon version of the editor.
    Has anyone else encountered such trouble in trying to make a Mac build? Is there anything I can do to fix this?

    I am considering outsourcing the Mac build just so I have one functioning asap, but because I plan on issuing frequent updates, it's not super practical for me to hire someone to do it every time.

    Any help would be incredibly appreciated! Thanks so much!
     
    Last edited: Nov 16, 2021
  2. kjyv

    kjyv

    Joined:
    Feb 20, 2018
    Posts:
    53
    Opening the project in Unity on a Mac should be your first direction to peek into further. I don't know how you go about it but building Mac .app on Windows means you need to use some fake compiler pipeline, not the one Apple provides, so I would expect problems (even though darker but it works is super weird).
    If there is no way to make 2021.2 work (you don't need the jar resolver for a Mac build AFAIK, that's for Android), you can also try 2020.3 as that is much more stable. The differences shouldn't be huge. Make sure to not include the Library folder when you copy you project from windows or to the older Unity version. Good luck!
     
  3. JudahMantell

    JudahMantell

    Joined:
    Feb 28, 2017
    Posts:
    476
    Thank you for the suggestion! Turns out it's actually a bug in 2021.1 where if "Use Display in HDR Mode" is ticked on Mac, it results in the darker image.
    And after some optimization, the lag has been reduced significantly--it was mainly a matter of reducing texture sizes.
     
    TheWarper, marcospgp and kjyv like this.
  4. marcospgp

    marcospgp

    Joined:
    Jun 11, 2018
    Posts:
    194
    Does anyone know what the impact of disabling "use display in HDR mode" is? It seems to break the editor on Mac so I'm having to keep it disabled :(
     
  5. JudahMantell

    JudahMantell

    Joined:
    Feb 28, 2017
    Posts:
    476
    Hey, it really just means exactly that: it disables using HDR mode on supported displays.
    You can learn more here: https://docs.unity3d.com/Manual/HDR.html
     
    marcospgp likes this.
  6. marcospgp

    marcospgp

    Joined:
    Jun 11, 2018
    Posts:
    194
    @Tautvydas-Zilys is the Unity team aware of this issue with HDR output on Mac or should someone report it?
     
  7. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,670
    I asked people working on Metal and they said it is not a known issue. Can you report a bug?
     
    marcospgp likes this.
  8. JudahMantell

    JudahMantell

    Joined:
    Feb 28, 2017
    Posts:
    476
    Looks like it is fixed in 2022 LTS, but still not in 2021 LTS