Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
e454a77
Add CallbackHelper lifecycle handling and fix unit test execution
OswaldoApexSystems Apr 21, 2026
a8b762d
Merge branch 'release-6.1.0' into Fix/EOSU-1013-Update-Services/EOSSe…
OswaldoApexSystems Apr 22, 2026
9d9e99f
Avoid unloading EOS SDK in Unity Editor and rely on explicit test cal…
OswaldoApexSystems Apr 22, 2026
ef7bdbd
Update EOSManager.cs
OswaldoApexSystems Apr 23, 2026
e599483
Merge branch 'release-6.1.0' into Fix/EOSU-1013-Update-Services/EOSSe…
OswaldoApexSystems Apr 24, 2026
40a298f
Update EOSManager.cs
OswaldoApexSystems Apr 27, 2026
d76ef5f
Update EOSManager.cs
OswaldoApexSystems Apr 27, 2026
40cf5b9
Merge branch 'release-6.1.0' into Fix/EOSU-1013-Update-Services/EOSSe…
OswaldoApexSystems Apr 27, 2026
7e8d129
Merge branch 'release-6.1.0' into Fix/EOSU-1013-Update-Services/EOSSe…
OswaldoApexSystems Apr 28, 2026
580cec9
Merge branch 'release-6.1.0' into Fix/EOSU-1013-Update-Services/EOSSe…
OswaldoApexSystems Apr 28, 2026
024764b
Merge branch 'release-6.1.0' into Fix/EOSU-1013-Update-Services/EOSSe…
OswaldoApexSystems Apr 29, 2026
c139b1e
Merge branch 'release-6.1.0' into Fix/EOSU-1013-Update-Services/EOSSe…
OswaldoApexSystems Apr 30, 2026
393b8bc
Merge branch 'release-6.1.0' into Fix/EOSU-1013-Update-Services/EOSSe…
OswaldoApexSystems May 4, 2026
9d59e06
Merge branch 'release-6.1.0' into Fix/EOSU-1013-Update-Services/EOSSe…
OswaldoApexSystems May 5, 2026
2cb7cb2
Merge branch 'release-6.1.0' into Fix/EOSU-1013-Update-Services/EOSSe…
OswaldoApexSystems May 7, 2026
d02fd3c
Merge branch 'release-6.1.0' into Fix/EOSU-1013-Update-Services/EOSSe…
OswaldoApexSystems May 11, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 10 additions & 9 deletions Assets/Tests/PlayMode/Services/FriendsTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public IEnumerator QueryFriendsList()
QueryFriendsCallbackInfo? result = null;
_friendsInterface.QueryFriends(ref options, null, (ref QueryFriendsCallbackInfo data) => { result = data; });

yield return new WaitUntil(() => result != null);
yield return new WaitUntilDone(GlobalTestTimeout, () => result != null);
if (result != null)
{
Assert.AreEqual(Result.Success, result.Value.ResultCode, "Could not query the friends list.");
Expand Down Expand Up @@ -103,7 +103,7 @@ public IEnumerator SearchFriendsListByDisplayName()
QueryUserInfoByDisplayNameCallbackInfo? queryResult = null;
_userInfoInterface.QueryUserInfoByDisplayName(ref options, null, (ref QueryUserInfoByDisplayNameCallbackInfo data) => { queryResult = data; });

yield return new WaitUntil(() => queryResult != null);
yield return new WaitUntilDone(GlobalTestTimeout, () => queryResult != null);
Assert.AreEqual(Result.NotFound, queryResult.Value.ResultCode);

// TODO: Will need set test accounts to verify that the results are correct. For now,
Expand Down Expand Up @@ -146,7 +146,8 @@ public IEnumerator QuerySelfInfo()
QueryUserInfoCallbackInfo? queryResult = null;
_userInfoInterface.QueryUserInfo(ref queryOptions, null, (ref QueryUserInfoCallbackInfo data) => { queryResult = data; });

yield return new WaitUntil(() => queryResult != null);
yield return new WaitUntilDone(GlobalTestTimeout, () => queryResult != null);

if (queryResult != null)
{
Assert.AreEqual(Result.Success, queryResult.Value.ResultCode, "Could not query for self.");
Expand Down Expand Up @@ -188,7 +189,7 @@ public IEnumerator SendReportToSelf()
SendPlayerBehaviorReportCompleteCallbackInfo? reportResult = null;
reportsHandle.SendPlayerBehaviorReport(ref reportOptions, null, (ref SendPlayerBehaviorReportCompleteCallbackInfo data) => { reportResult = data; });

yield return new WaitUntil(() => reportResult != null);
yield return new WaitUntilDone(GlobalTestTimeout, () => reportResult != null);

if (reportResult != null)
{
Expand All @@ -212,7 +213,7 @@ public IEnumerator SendReportToFirstFriend()
QueryFriendsCallbackInfo? result = null;
_friendsInterface.QueryFriends(ref options, null, (ref QueryFriendsCallbackInfo data) => { result = data; });

yield return new WaitUntil(() => result != null);
yield return new WaitUntilDone(GlobalTestTimeout, () => result != null);
if (result != null)
{
Assert.AreEqual(Result.Success, result.Value.ResultCode, "Could not query the friends list.");
Expand Down Expand Up @@ -243,7 +244,7 @@ public IEnumerator SendReportToFirstFriend()
QueryExternalAccountMappingsCallbackInfo? externalData = null;
connectHandle.QueryExternalAccountMappings(ref queryOptions, null, (ref QueryExternalAccountMappingsCallbackInfo data) => { externalData = data; });

yield return new WaitUntil(() => externalData != null);
yield return new WaitUntilDone(GlobalTestTimeout, () => externalData != null);
if (externalData != null)
{
Assert.AreEqual(Result.Success, externalData.Value.ResultCode,
Expand Down Expand Up @@ -273,7 +274,7 @@ public IEnumerator SendReportToFirstFriend()
SendPlayerBehaviorReportCompleteCallbackInfo? reportResult = null;
reportsHandle.SendPlayerBehaviorReport(ref reportOptions, null, (ref SendPlayerBehaviorReportCompleteCallbackInfo data) => { reportResult = data; });

yield return new WaitUntil(() => reportResult != null);
yield return new WaitUntilDone(GlobalTestTimeout, () => reportResult != null);

if (reportResult != null)
{
Expand All @@ -299,7 +300,7 @@ public IEnumerator ShowHideFriendsOverlay()
null,
(ref ShowFriendsCallbackInfo data) => { overlayResult = data; });

yield return new WaitUntil(() => overlayResult != null);
yield return new WaitUntilDone(GlobalTestTimeout, () => overlayResult != null);
if (overlayResult != null)
{
Assert.AreEqual(Result.Success, overlayResult.Value.ResultCode, "Could not notify overlay to show friends");
Expand All @@ -315,7 +316,7 @@ public IEnumerator ShowHideFriendsOverlay()
null,
(ref HideFriendsCallbackInfo data) => { hideResult = data; });

yield return new WaitUntil(() => hideResult != null);
yield return new WaitUntilDone(GlobalTestTimeout, () => hideResult != null);
if (hideResult != null)
{
Assert.AreEqual(Result.Success, hideResult.Value.ResultCode, "Could not notify overlay to hide friends");
Expand Down
27 changes: 20 additions & 7 deletions com.playeveryware.eos/Runtime/Core/EOSManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,14 @@
#define EOS_CAN_SHUTDOWN
#endif

// This define controls if the EOS SDK should be unloaded in the editor at shutdown to work around DLL unload errors.
//#define EOS_DO_NOT_UNLOAD_SDK_ON_SHUTDOWN

// On macOS and Linux, there isn't a known reliable way to unload shared libraries, therefore this is the default behavior.
#if (UNITY_EDITOR_OSX || UNITY_EDITOR_LINUX)
#define EOS_DO_NOT_UNLOAD_SDK_ON_SHUTDOWN
// As per Epic's documentation they recommend not calling PlatformInterface.Release / PlatformInterface.Shutdown in editor
// because Unity doesn't unload managed libraries until the Editor exits. Doing so will cause unintended side effects:
// https://dev.epicgames.com/docs/epic-online-services/eos-get-started/get-started-guide/next-steps#shut-down-the-eos-sdk
// This is also required on macOS/Linux always, because there isn't a known reliable way to unload shared libraries
#if UNITY_EDITOR && (!UNITY_EDITOR_WIN || !EOS_UNLOAD_SDK_ON_SHUTDOWN_IN_WIN_EDITOR)
// This define controls if the EOS SDK should be unloaded in the editor at shutdown to work around DLL unload errors.
#define EOS_DO_NOT_UNLOAD_SDK_ON_SHUTDOWN_IN_EDITOR
#endif

#if !UNITY_EDITOR
Expand Down Expand Up @@ -220,7 +222,7 @@ public partial class EOSSingleton
static private bool s_hasInitializedPlatform;

private static readonly bool s_eosUnloadSDKOnShutdown =
#if EOS_DO_NOT_UNLOAD_SDK_ON_SHUTDOWN
#if EOS_DO_NOT_UNLOAD_SDK_ON_SHUTDOWN_IN_EDITOR && UNITY_EDITOR
false
#else
true
Expand Down Expand Up @@ -1652,15 +1654,26 @@ public void OnApplicationShutdown()
Log("Waiting for pending finalizers.");
System.GC.WaitForPendingFinalizers();
#endif
Log("Disposing notification handles before platform release.");
s_notifyLoginStatusChangedCallbackHandle?.Dispose();
s_notifyLoginStatusChangedCallbackHandle = null;

s_notifyConnectLoginStatusChangedCallbackHandle?.Dispose();
s_notifyConnectLoginStatusChangedCallbackHandle = null;

s_notifyConnectAuthExpirationCallbackHandle?.Dispose();
s_notifyConnectAuthExpirationCallbackHandle = null;

Log("Releasing the EOS Platform Interface.");
GetEOSPlatformInterface()?.Release();

#if UNITY_EDITOR
if (s_eosUnloadSDKOnShutdown)
#endif
{
Log("Shutting down the platform interface.");
ShutdownPlatformInterface();
}

SetEOSPlatformInterface(null);


Expand Down