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
  3. Dismiss Notice

Question Steam Overlay not working on MacOS, I've tried everything found in prior threads...

Discussion in 'Editor & General Support' started by bobhohman, May 22, 2024.

  1. bobhohman

    bobhohman

    Joined:
    Jun 4, 2021
    Posts:
    9
    We are developing a game that runs on Mac and PC, integrated with Steam via Steamworks.Net.

    The steam overlay on Mac will not pop up when I press shift-tab. I've been searching and double checking things for 2 days.

    - it works fine on PC's in our team
    - it works on NONE of the macs in our team (4 different macs, 4 different MacOS versions)
    - overlay is enabled in Properties for the game in steam
    - I am always starting from Steam
    - We are on unity 2023.2.19f1, MacOS ranging from 13.x to 14.4 Sonoma
    - We are using the default Mac Graphics library which is Metal
    - if I call the Steamworks API ISteamFriends::ActivateGameOverlay directly, it DOES pop the overlay
    - I have confirmed we have the 2 required entitlements on the binary installed by steam:

    Executable=/Users/robert/Library/Application Support/Steam/steamapps/common/Bellumentum/Bellumentum.app/Contents/MacOS/Bellumentum
    <?xml version="1.0" encoding="UTF-8"?><!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "https://www.apple.com/DTDs/PropertyList-1.0.dtd"><plist version="1.0">
    <dict>
    <key>com.apple.security.cs.disable-executable-page-protection</key><true/>
    <key>com.apple.security.cs.disable-library-validation</key><true/>
    </dict>
    </plist>

    - I am using the latest version of Steamworks.Net
    - Steamworks.Net initializes fine, and we use other API's like the friends API to get friends, join games, etc... So I know the Steam dylib is loading fine and working
    - The overlay DOES work in other games on my Mac, so it MUST be our game, not Steam itself
    - I've uninstalled and reinstalled steam

    Shift-Tab just does nothing on all of our macs.

    I'm out of ideas, is there something I've overlooked?

    Thanks a million for any help -
     
    Last edited: May 22, 2024
  2. Adrian

    Adrian

    Joined:
    Apr 5, 2008
    Posts:
    1,098
    I did not have issues with the overlay on Mac, with or without Steamworks.Net.

    Does the prompt to use shift-tab to open the overlay appear at game startup in the bottom right corner?

    You could try a build without Steamworks.Net to see if it's something with its initialization that breaks the overlay.

    What do you have set as path for the launch configuration in the Steam backend, just a path to the app bundle or to the binary inside the bundle? With the later I had various issues, since it launches the game differently.

    In the entitlements, I also have "com.apple.security.cs.allow-dyld-environment-variables". Not sure what's required nowadays but I'd expect a crash or the steam integration not working at all if you mess up the entitlements. But you could try an unsigned build to see if it's related to the entitlements.
     
  3. bobhohman

    bobhohman

    Joined:
    Jun 4, 2021
    Posts:
    9
    Thanks for answering.

    The prompt does NOT appear.

    My path is to the binary inside the bundle.... I changed it and the working directory to just point to the .app file, game still launches fine, from your comments it sounds like this is preferable. Unfortunately it didn't fix the overlay issue.

    I tried adding the additional entitlement "com.apple.security.cs.allow-dyld-environment-variables" - sadly it also had no effect.

    This is a head scratcher.

    What can we infer from the fact that the prompt does not appear in the bottom right corner? that the hooking of the game via the dylib is never happening?

    Thank you again for your help, much much appreciated -
     
  4. Adrian

    Adrian

    Joined:
    Apr 5, 2008
    Posts:
    1,098
    If you can trigger the overlay through the API but the prompt doesn't appear, that does sound like Steam is thinking the overlay is disabled. You said you have enabled the overlay in the Steamworks settings, where do you have this option? I don't see it for my games and it seems this option should only be available for software, not games? There seems to be a hidden option but you'd need to contact Steam to check and change it.
     
  5. bobhohman

    bobhohman

    Joined:
    Jun 4, 2021
    Posts:
    9
    OK, this is solved, thanks again for your help.

    I had to add this to the entitlements file for MacOS 14+ (I think - could be even earlier)

    <key>com.apple.security.cs.allow-dyld-environment-variables</key>
    <true/>

    So the full entitlements file is:

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    <plist version="1.0">
    <dict>
    <key>com.apple.security.cs.disable-library-validation</key>
    <true/>
    <key>com.apple.security.cs.disable-executable-page-protection</key>
    <true/>
    <key>com.apple.security.cs.allow-dyld-environment-variables</key>
    <true/>
    </dict>
    </plist>

    After doing this, the overlay works!