can't shutdown macos application build by unity with eos plugin for unity 4.1.0

Unity 6000.0.51f1

EOS plugin for Unity 4.1.0

MacOS 15.6.1

After I replaced the EOS plugin from version 4.0.1 to 4.1.0, the macOS version of our application no longer shuts down.

This happens even when there is no communication with EOS.

I enabled EOS_CAN_SHUTDOWN, which is defined on line 35 of EOSManager.cs, and the application now quits properly.

Is this the correct way to fix this?

Hi, In version 4.1.0, an adjustment was made in EOSManager to ensure that the EOS_DISABLE directive works correctly.

As part of this change, a difference in the shutdown behavior on macOS was introduced. The cleanest solution is to update the definition of

EOS_CAN_SHUTDOWN to include UNITY_STANDALONE_OSX , since macOS does support shutting down the EOS SDK properly in standalone builds:

#if UNITY_EDITOR_WIN || UNITY_EDITOR_OSX || UNITY_STANDALONE_WIN || UNITY_STANDALONE_OSX
#define EOS_CAN_SHUTDOWN
#endif

Your current solution—manually enabling EOS_CAN_SHUTDOWN on macOS standalone—is also valid and is a common practice in production to ensure the process terminates correctly.

It’s worth noting that there is a warning in the code indicating that unloading shared libraries on macOS/Linux is “not reliable,” which is why this directive is not enabled by default. However, this warning mainly applies to hot-reload scenarios (e.g., inside the Editor), not to standalone builds.

In a standalone build, shutting down the app with this define is safe, provided that:

  • You do not attempt to unload and reload EOS during the same execution.
  • You only use it when the process is actually terminating, not during Editor domain reloads.

For these reasons, updating the EOS_CAN_SHUTDOWN definition to include UNITY_STANDALONE_OSX is the cleanest and most maintainable approach. It ensures consistent behavior between the Editor and macOS standalone builds without requiring manual patches.

On macOS and Linux, there isn’t a known reliable way to unload shared libraries.

Thank you for your reply.

I recently updated to EOS SDK 4.1.1 and the issue was fixed.

Thank you for fixing it.