I can’t get Epic EOS SDK working on Unity 6.1 with Apple Silicon.
Environment:
- Unity Version: 6.1.2
- macOS Version: 15.4.1 (Sonoma)
- EOS Plugin for Unity: PlayEveryWare
eos_plugin_for_unity v4.0.1
- Architecture: Apple Silicon (M2 Pro)
- Project Type: Default “Lobbies” sample scene from the EOS Samples
- EOS SDK Config: Using plugin defaults; only platform-specific setup steps were adjusted
Issue:
When clicking the “Login” button in the Lobbies sample scene, the app throws a
NullReferenceException
and fails to proceed with login.The same scene works correctly on Windows 11 x86_64 with Unity 6.1 and the same plugin version and credentials.
Stack Trace:
NullReferenceException: Object reference not set to an instance of an object
PlayEveryWare.EpicOnlineServices.EOSManager+EOSSingleton.StartLoginWithLoginOptions (Epic.OnlineServices.Auth.LoginOptions loginOptions, PlayEveryWare.EpicOnlineServices.EOSManager+OnAuthLoginCallback onLoginCallback) (at LocalPackages/com.playeveryware.eos/Runtime/Core/EOSManager.cs:1427)
PlayEveryWare.EpicOnlineServices.EOSManager+EOSSingleton.StartLoginWithLoginTypeAndToken (Epic.OnlineServices.Auth.LoginCredentialType loginType, Epic.OnlineServices.ExternalCredentialType externalCredentialType, System.String id, System.String token, PlayEveryWare.EpicOnlineServices.EOSManager+OnAuthLoginCallback onLoginCallback) (at LocalPackages/com.playeveryware.eos/Runtime/Core/EOSManager.cs:1332)
PlayEveryWare.EpicOnlineServices.EOSManager+EOSSingleton.StartLoginWithLoginTypeAndToken (Epic.OnlineServices.Auth.LoginCredentialType loginType, System.String id, System.String token, PlayEveryWare.EpicOnlineServices.EOSManager+OnAuthLoginCallback onLoginCallback) (at LocalPackages/com.playeveryware.eos/Runtime/Core/EOSManager.cs:1323)
PlayEveryWare.EpicOnlineServices.Samples.UILoginMenu.OnLoginButtonClick () (at Assets/Samples/Epic Online Services Plugin for Unity/4.0.1/Standard Pack _ EOS Plugin for Unity Samples/Scripts/UI/Login/UILoginMenu.cs:1087)
UnityEngine.Events.InvokableCall.Invoke () (at /Users/bokken/build/output/unity/unity/Runtime/Export/UnityEvent/UnityEvent.cs:178)
UnityEngine.Events.UnityEvent.Invoke () (at /Users/bokken/build/output/unity/unity/artifacts/generated/UnityEvent/UnityEvent_0.cs:57)
UnityEngine.UI.Button.Press () (at ./Library/PackageCache/com.unity.ugui@f55986520ec2/Runtime/UGUI/UI/Core/Button.cs:70)
UnityEngine.UI.Button.OnPointerClick (UnityEngine.EventSystems.PointerEventData eventData) (at ./Library/PackageCache/com.unity.ugui@f55986520ec2/Runtime/UGUI/UI/Core/Button.cs:114)
UnityEngine.EventSystems.ExecuteEvents.Execute (UnityEngine.EventSystems.IPointerClickHandler handler, UnityEngine.EventSystems.BaseEventData eventData) (at ./Library/PackageCache/com.unity.ugui@f55986520ec2/Runtime/UGUI/EventSystem/ExecuteEvents.cs:57)
UnityEngine.EventSystems.ExecuteEvents.Execute[T] (UnityEngine.GameObject target, UnityEngine.EventSystems.BaseEventData eventData, UnityEngine.EventSystems.ExecuteEvents+EventFunction`1[T1] functor) (at ./Library/PackageCache/com.unity.ugui@f55986520ec2/Runtime/UGUI/EventSystem/ExecuteEvents.cs:272)
UnityEngine.EventSystems.EventSystem:Update() (at ./Library/PackageCache/com.unity.ugui@f55986520ec2/Runtime/UGUI/EventSystem/EventSystem.cs:530)
Notes:
- The exception appears to be caused by
EOSManager.Instance
- or related auth setup being null or improperly initialized.
- No changes were made to the sample scene.
EOSManager.Instance
null
- in debug logs when stepping through the code on macOS, but behaves normally on Windows.
- The plugin was imported via Package Manager git url as instructed.
Steps Taken:
- Re-imported the plugin.
- Verified project settings for platform differences.
- Cleaned Library folder.
- Tried both Editor and Mac standalone builds.
- Tried moving dylibs to Plugins and setting them explicitly to Apple Silicon
Request:
Could you help verify if this is a known issue with the plugin on macOS or Apple Silicon? Any guidance or workaround to ensure proper initialization of
EOSManager
or
AuthInterface
on macOS would be appreciated.Thanks!
My gut feeling is that the machine you’re using doesn’t have git-lfs setup correctly for the repo therefore installing it via the git-url is going to cause it to not grab the binary from github correctly. Do you have git-lfs installed on that mac?
Hi Colin,
We tested your setup both in-editor and standalone, but did not encounter the error you’re reporting. The one difference is this was tested on Sequoia 15.5 and not Sonoma, but we don’t think that should affect the results. Are you seeing issues with other sample apps as well?
-Jef
It’s surprising that it’s working for you; I can’t get any of the samples to work on macOS.
For example, these errors are from the Leaderboards sample:
DynamicBindingException: Failed to hook dynamic binding for '_EOS_AntiCheatClient_Reserved01'
Epic.OnlineServices.Bindings.Hook[TLibraryHandle] (TLibraryHandle libraryHandle, System.Func`3[T1,T2,TResult] getFunctionPointer) (at ./LocalPackages/com.playeveryware.eos/Runtime/EOS_SDK/Generated/Bindings.cs:2145)
PlayEveryWare.EpicOnlineServices.EOSManager+EOSSingleton.LoadDelegatesWithEOSBindingAPI () (at LocalPackages/com.playeveryware.eos/Runtime/Core/EOSManager_DynamicLoading.cs:168)
PlayEveryWare.EpicOnlineServices.EOSManager+EOSSingleton.LoadEOSLibraries () (at LocalPackages/com.playeveryware.eos/Runtime/Core/EOSManager_DynamicLoading.cs:214)
PlayEveryWare.EpicOnlineServices.EOSManager+EOSSingleton.Init (PlayEveryWare.EpicOnlineServices.IEOSCoroutineOwner coroutineOwner, System.String configFileName) (at LocalPackages/com.playeveryware.eos/Runtime/Core/EOSManager.cs:623)
PlayEveryWare.EpicOnlineServices.EOSManager.Awake () (at LocalPackages/com.playeveryware.eos/Runtime/Core/EOSManager.cs:1879)
NullReferenceException: Object reference not set to an instance of an object
PlayEveryWare.EpicOnlineServices.EOSManager+EOSSingleton.StartLoginWithLoginOptions (Epic.OnlineServices.Auth.LoginOptions loginOptions, PlayEveryWare.EpicOnlineServices.EOSManager+OnAuthLoginCallback onLoginCallback) (at LocalPackages/com.playeveryware.eos/Runtime/Core/EOSManager.cs:1427)
PlayEveryWare.EpicOnlineServices.EOSManager+EOSSingleton.StartLoginWithLoginTypeAndToken (Epic.OnlineServices.Auth.LoginCredentialType loginType, Epic.OnlineServices.ExternalCredentialType externalCredentialType, System.String id, System.String token, PlayEveryWare.EpicOnlineServices.EOSManager+OnAuthLoginCallback onLoginCallback) (at LocalPackages/com.playeveryware.eos/Runtime/Core/EOSManager.cs:1332)
PlayEveryWare.EpicOnlineServices.EOSManager+EOSSingleton.StartLoginWithLoginTypeAndToken (Epic.OnlineServices.Auth.LoginCredentialType loginType, System.String id, System.String token, PlayEveryWare.EpicOnlineServices.EOSManager+OnAuthLoginCallback onLoginCallback) (at LocalPackages/com.playeveryware.eos/Runtime/Core/EOSManager.cs:1323)
PlayEveryWare.EpicOnlineServices.Samples.UILoginMenu.OnLoginButtonClick () (at Assets/Samples/Epic Online Services Plugin for Unity/4.0.1/Standard Pack _ EOS Plugin for Unity Samples/Scripts/UI/Login/UILoginMenu.cs:1087)
UnityEngine.Events.InvokableCall.Invoke () (at /Users/bokken/build/output/unity/unity/Runtime/Export/UnityEvent/UnityEvent.cs:178)
UnityEngine.Events.UnityEvent.Invoke () (at /Users/bokken/build/output/unity/unity/artifacts/generated/UnityEvent/UnityEvent_0.cs:57)
UnityEngine.UI.Button.Press () (at ./Library/PackageCache/com.unity.ugui@f55986520ec2/Runtime/UGUI/UI/Core/Button.cs:70)
UnityEngine.UI.Button.OnPointerClick (UnityEngine.EventSystems.PointerEventData eventData) (at ./Library/PackageCache/com.unity.ugui@f55986520ec2/Runtime/UGUI/UI/Core/Button.cs:114)
UnityEngine.EventSystems.ExecuteEvents.Execute (UnityEngine.EventSystems.IPointerClickHandler handler, UnityEngine.EventSystems.BaseEventData eventData) (at ./Library/PackageCache/com.unity.ugui@f55986520ec2/Runtime/UGUI/EventSystem/ExecuteEvents.cs:57)
UnityEngine.EventSystems.ExecuteEvents.Execute[T] (UnityEngine.GameObject target, UnityEngine.EventSystems.BaseEventData eventData, UnityEngine.EventSystems.ExecuteEvents+EventFunction`1[T1] functor) (at ./Library/PackageCache/com.unity.ugui@f55986520ec2/Runtime/UGUI/EventSystem/ExecuteEvents.cs:272)
UnityEngine.EventSystems.EventSystem:Update() (at ./Library/PackageCache/com.unity.ugui@f55986520ec2/Runtime/UGUI/EventSystem/EventSystem.cs:530)
I even tried making very minimal cut-down apps, and they all failed.
Did you test on Apple Silicon or Intel?
I’m able to get the same projects working on Windows.
Maybe it is the macOS version. I don’t have an Apple Silicon machine with an older version of macOS - but I could install a VM to test if you’re sure that’s the only difference.
Hello,
We have the same problem,
can you tell us please - did you solve this?
We are using tar version of PEW plugin, version 4.1.0
Unity 2021.3.14f1
Mac OS Sequoia 15.5
Apple M4 Pro (mac mini)
On windows unity editor all is working fine.
Looks like this may be related to https://forums.unrealengine.com/t/2858295
Also may be we need to adjust some security settings on macOS to allow libraries to be loaded?
Dylibs in filesystem:
macOS % ls -l
total 93248
drwxr-xr-x@ 14 user staff 448 20 авг 16:21 Core
-rw-r--r--@ 1 user staff 172 20 авг 16:19 Core.meta
-rw-r--r--@ 1 user staff 112608 20 авг 16:19 libDynamicLibraryLoaderHelper.dylib
-rw-r--r--@ 1 user staff 616 20 авг 16:19 libDynamicLibraryLoaderHelper.dylib.meta
-rw-r--r--@ 1 user staff 47369360 20 авг 16:19 libEOSSDK-Mac-Shipping.dylib
-rw-r--r--@ 1 user staff 1501 20 авг 16:19 libEOSSDK-Mac-Shipping.dylib.meta
-rw-r--r--@ 1 user staff 171 20 авг 16:19 license.txt
-rw-r--r--@ 1 user staff 158 20 авг 16:19 license.txt.meta
-rw-r--r--@ 1 user staff 83336 20 авг 16:19 MicrophoneUtility_macos.dylib
-rw-r--r--@ 1 user staff 633 20 авг 16:19 MicrophoneUtility_macos.dylib.meta
-rw-r--r--@ 1 user staff 141252 20 авг 16:19 ThirdPartySoftwareNotice.txt
-rw-r--r--@ 1 user staff 158 20 авг 16:19 ThirdPartySoftwareNotice.txt.meta
macOS % file *.dylib
libDynamicLibraryLoaderHelper.dylib: Mach-O universal binary with 1 architecture: [arm64:Mach-O 64-bit dynamically linked shared library arm64]
libDynamicLibraryLoaderHelper.dylib (for architecture arm64): Mach-O 64-bit dynamically linked shared library arm64
libEOSSDK-Mac-Shipping.dylib: Mach-O universal binary with 2 architectures: [x86_64:Mach-O 64-bit dynamically linked shared library x86_64] [arm64]
libEOSSDK-Mac-Shipping.dylib (for architecture x86_64): Mach-O 64-bit dynamically linked shared library x86_64
libEOSSDK-Mac-Shipping.dylib (for architecture arm64): Mach-O 64-bit dynamically linked shared library arm64
MicrophoneUtility_macos.dylib: Mach-O universal binary with 2 architectures: [x86_64:Mach-O 64-bit dynamically linked shared library x86_64] [arm64:Mach-O 64-bit dynamically linked shared library arm64]
MicrophoneUtility_macos.dylib (for architecture x86_64): Mach-O 64-bit dynamically linked shared library x86_64
MicrophoneUtility_macos.dylib (for architecture arm64): Mach-O 64-bit dynamically linked shared library arm64
Looks like I found the answer for me.
I have mac Unity Editor switched to Windows build platform, and this causes plugin code to set
#define EOS_PLATFORM_WINDOWS_64
And this cause
Epic.OnlineServices.Common.LIBRARY_NAME = EOSSDK-Win64-Shipping
on mac editor.
This looks like a bug and should be fixed.
Our team have Macs and Windows development workstations.
We publish to Epic Store only for Windows platforms.
So even on macs we have build target setted to Windows, to see Windows code in code editor under UNITY_STANDALONE_WIN pragmas.
And it would be cool if we can run in editor on macs in this case.
Yes, git-lfs is set up. I’m using it via gitea for my own projects.
Sorry - clicked the wrong button and wrote an answer rather than a reply - adding a reply to ensure it pings you [Content removed] Shyy !
Those kinds of issues happen when the EOS SDK isn’t actually a binary, but just a git-lfs pointer file. This could also happen if Unity isn’t able to invoke git-lfs. This can also happen if there is some other failure loading the binary. Can you locate the EOS SDK binary in the package and double check that it is a valid macOS binary? If it’s a very small file size (less than a few megabytes), that implies that git-lfs didn’t run correctly.
Did you manage to look at this [Content removed] Shyy ?
Oh, glad you found a solution. In my case, it was not set to WINDOWS build - I was building Mac on Mac. For now, I’ve given up making the Mac build work and I actually bought a Windows dev machine and switched to Windows because I couldn’t make it work.
Interesting…
As I say, we use git-lfs internally and have home-grown git-lfs libraries we include in Unity. Don’t see any issues with those, so it’s curious indeed.
~/W/e/A/P/macOS ❯❯❯ pwd;ls -altrh
/Users/colinmacleod/Work/eos-samples/Assets/Plugins/macOS
total 87376
drwxr-xr-x@ 6 colinmacleod staff 192B May 12 13:45 ..
-rw-r--r--@ 1 colinmacleod staff 45B May 12 13:45 .gitattributes
-rw-r--r--@ 1 colinmacleod staff 172B May 12 13:45 Core.meta
drwxr-xr-x@ 8 colinmacleod staff 256B May 12 13:45 Core
-rw-r--r--@ 1 colinmacleod staff 633B May 12 13:45 MicrophoneUtility_macos.dylib.meta
-rw-r--r--@ 1 colinmacleod staff 135K May 12 13:45 ThirdPartySoftwareNotice.txt
-rw-r--r--@ 1 colinmacleod staff 158B May 12 13:45 ThirdPartySoftwareNotice.txt.meta
-rw-r--r--@ 1 colinmacleod staff 892B May 12 13:45 libDynamicLibraryLoaderHelper.dylib.meta
-rw-r--r--@ 1 colinmacleod staff 1.5K May 12 13:45 libEOSSDK-Mac-Shipping.dylib.meta
-rw-r--r--@ 1 colinmacleod staff 169B May 12 13:45 license.txt
-rw-r--r--@ 1 colinmacleod staff 158B May 12 13:45 license.txt.meta
-rw-r--r--@ 1 colinmacleod staff 207K May 12 13:45 libDynamicLibraryLoaderHelper.dylib
-rw-r--r--@ 1 colinmacleod staff 129K May 12 13:45 MicrophoneUtility_macos.dylib
drwxr-xr-x@ 15 colinmacleod staff 480B May 12 13:45 .
-rw-r--r--@ 1 colinmacleod staff 42M May 12 13:45 libEOSSDK-Mac-Shipping.dylib
[Content removed] Hirata
~/W/e/A/P/macOS ❯❯❯ file *.dylib
libDynamicLibraryLoaderHelper.dylib: Mach-O universal binary with 2 architectures: [x86_64:Mach-O 64-bit dynamically linked shared library x86_64] [arm64:Mach-O 64-bit dynamically linked shared library arm64]
libDynamicLibraryLoaderHelper.dylib (for architecture x86_64): Mach-O 64-bit dynamically linked shared library x86_64
libDynamicLibraryLoaderHelper.dylib (for architecture arm64): Mach-O 64-bit dynamically linked shared library arm64
libEOSSDK-Mac-Shipping.dylib: Mach-O universal binary with 2 architectures: [x86_64:Mach-O 64-bit dynamically linked shared library x86_64] [arm64]
libEOSSDK-Mac-Shipping.dylib (for architecture x86_64): Mach-O 64-bit dynamically linked shared library x86_64
libEOSSDK-Mac-Shipping.dylib (for architecture arm64): Mach-O 64-bit dynamically linked shared library arm64
MicrophoneUtility_macos.dylib: Mach-O universal binary with 2 architectures: [x86_64:Mach-O 64-bit dynamically linked shared library x86_64] [arm64:Mach-O 64-bit dynamically linked shared library arm64]
MicrophoneUtility_macos.dylib (for architecture x86_64): Mach-O 64-bit dynamically linked shared library x86_64
MicrophoneUtility_macos.dylib (for architecture arm64): Mach-O 64-bit dynamically linked shared library arm64