Skip to content

Commit db52736

Browse files
authored
Merge pull request #765 from PlayEveryWare/release-3.3.0
Release 3.3.0
2 parents e54ee33 + 1d5b8c6 commit db52736

File tree

307 files changed

+2304
-1121
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

307 files changed

+2304
-1121
lines changed

Assets/Plugins/Android/Editor.meta

Lines changed: 0 additions & 33 deletions
This file was deleted.
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
version https://git-lfs.github.com/spec/v1
2-
oid sha256:86dc58d785843505f8704b52f46ae0b408f68c4796a678b5e5f456173dc5aa7b
3-
size 81336
2+
oid sha256:13cfd9edf7058c4b110cb7c34b312dcbd894fffe038e8181d048555b76c105d5
3+
size 85024

Assets/Plugins/Linux/libDynamicLibraryLoaderHelper.so.meta

Lines changed: 3 additions & 20 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Assets/Plugins/Source/Core/EOSManager.cs

Lines changed: 58 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,6 @@ namespace PlayEveryWare.EpicOnlineServices
8080
using LogoutOptions = Epic.OnlineServices.Auth.LogoutOptions;
8181
using OnLogoutCallback = Epic.OnlineServices.Auth.OnLogoutCallback;
8282
#endif
83-
8483
/// <summary>
8584
/// One of the responsibilities of this class is to manage the lifetime of
8685
/// the EOS SDK and to be the interface for getting all the managed EOS interfaces.
@@ -468,7 +467,7 @@ private PlatformInterface CreatePlatformInterface(EOSConfig configData)
468467
IPlatformSpecifics platformSpecifics = EOSManagerPlatformSpecificsSingleton.Instance;
469468

470469
EOSCreateOptions platformOptions = new EOSCreateOptions();
471-
470+
472471
platformOptions.options.CacheDirectory = platformSpecifics.GetTempDir();
473472
platformOptions.options.IsServer = configData.isServer;
474473
platformOptions.options.Flags =
@@ -497,7 +496,8 @@ private PlatformInterface CreatePlatformInterface(EOSConfig configData)
497496

498497
var clientCredentials = new ClientCredentials
499498
{
500-
ClientId = configData.clientID, ClientSecret = configData.clientSecret
499+
ClientId = configData.clientID,
500+
ClientSecret = configData.clientSecret
501501
};
502502
platformOptions.options.ClientCredentials = clientCredentials;
503503

@@ -521,7 +521,7 @@ private PlatformInterface CreatePlatformInterface(EOSConfig configData)
521521
integratedPlatformOptionsContainer.Release();
522522
#endif
523523
return platformInterface;
524-
524+
525525
}
526526

527527
//-------------------------------------------------------------------------
@@ -585,24 +585,23 @@ public void Init(IEOSCoroutineOwner coroutineOwner, string configFileName)
585585
LoggingInterface.SetCallback(SimplePrintCallback);
586586
hasSetLoggingCallback = true;
587587
}
588-
#if UNITY_EDITOR
589-
SetLogLevel(LogCategory.AllCategories, LogLevel.VeryVerbose);
590-
#else
591-
SetLogLevel(LogCategory.AllCategories, LogLevel.Warning);
592-
#endif
593588

594589
InitializeOverlay(coroutineOwner);
595590
return;
596591
}
597592

598-
#if !UNITY_EDITOR && !UNITY_SWITCH
599-
// Set logging to VeryVerbose on EOS SDK bootstrap so we get the most logging information
600-
SetLogLevel(LogCategory.AllCategories, LogLevel.VeryVerbose);
601-
#endif
602593
s_state = EOSState.Starting;
603594

604595
LoadEOSLibraries();
605596

597+
// Set log level prior to platform interface initialization
598+
// VeryVerbose for dynamic linking platforms, otherwise set levels from configs
599+
#if UNITY_EDITOR
600+
SetLogLevel(LogCategory.AllCategories, LogLevel.VeryVerbose);
601+
#else
602+
InitializeLogLevels();
603+
#endif
604+
606605
var epicArgs = GetCommandLineArgsFromEpicLauncher();
607606

608607
if (!string.IsNullOrWhiteSpace(epicArgs.epicSandboxID))
@@ -672,16 +671,8 @@ public void Init(IEOSCoroutineOwner coroutineOwner, string configFileName)
672671
SetEOSPlatformInterface(eosPlatformInterface);
673672
UpdateEOSApplicationStatus();
674673

675-
676674
InitializeOverlay(coroutineOwner);
677675

678-
// Default back to quiet logs
679-
#if UNITY_EDITOR
680-
SetLogLevel(LogCategory.AllCategories, LogLevel.VeryVerbose);
681-
#else
682-
SetLogLevel(LogCategory.AllCategories, LogLevel.Warning);
683-
#endif
684-
685676
print("EOS loaded");
686677
}
687678

@@ -770,6 +761,21 @@ public void SetLogLevel(LogCategory Category, LogLevel Level)
770761
}
771762
}
772763

764+
//-------------------------------------------------------------------------
765+
/// <summary>
766+
/// Initialize log levels loaded from <see cref="LogLevelConfig" />.
767+
/// Should only be called after EOS library loaded, especially for dynamic linking platforms
768+
/// </summary>
769+
private void InitializeLogLevels()
770+
{
771+
var logLevelList = LogLevelUtility.LogLevelList;
772+
773+
for (int logCategoryIndex = 0; logCategoryIndex < logLevelList.Count; logCategoryIndex++)
774+
{
775+
SetLogLevel((LogCategory)logCategoryIndex, logLevelList[logCategoryIndex]);
776+
}
777+
}
778+
773779
//-------------------------------------------------------------------------
774780
/// <summary>
775781
/// Retrieves a log level previously set with <c>SetLogLevel</c>
@@ -826,7 +832,10 @@ static private LoginOptions MakeLoginOptions(LoginCredentialType loginType,
826832
{
827833
var loginCredentials = new Credentials
828834
{
829-
Type = loginType, ExternalType = externalCredentialType, Id = id, Token = token
835+
Type = loginType,
836+
ExternalType = externalCredentialType,
837+
Id = id,
838+
Token = token
830839
};
831840

832841
var defaultScopeFlags =
@@ -981,7 +990,9 @@ public void AuthLinkExternalAccountWithContinuanceToken(ContinuanceToken token,
981990
var authInterface = GetEOSPlatformInterface().GetAuthInterface();
982991
var linkOptions = new LinkAccountOptions
983992
{
984-
ContinuanceToken = token, LinkAccountFlags = linkAccountFlags, LocalUserId = null
993+
ContinuanceToken = token,
994+
LinkAccountFlags = linkAccountFlags,
995+
LocalUserId = null
985996
};
986997

987998
if (linkAccountFlags.HasFlag(LinkAccountFlags.NintendoNsaId))
@@ -1064,7 +1075,8 @@ public void StartConnectLoginWithEpicAccount(EpicAccountId epicAccountId,
10641075

10651076
connectLoginOptions.Credentials = new Epic.OnlineServices.Connect.Credentials
10661077
{
1067-
Token = userAuthToken.Value.AccessToken, Type = ExternalCredentialType.Epic
1078+
Token = userAuthToken.Value.AccessToken,
1079+
Type = ExternalCredentialType.Epic
10681080
};
10691081

10701082
StartConnectLoginWithOptions(connectLoginOptions, onConnectLoginCallback);
@@ -1074,7 +1086,8 @@ public void StartConnectLoginWithEpicAccount(EpicAccountId epicAccountId,
10741086
{
10751087
connectLoginOptions.Credentials = new Epic.OnlineServices.Connect.Credentials
10761088
{
1077-
Token = authToken.Value.AccessToken, Type = ExternalCredentialType.Epic
1089+
Token = authToken.Value.AccessToken,
1090+
Type = ExternalCredentialType.Epic
10781091
};
10791092

10801093
StartConnectLoginWithOptions(connectLoginOptions, onConnectLoginCallback);
@@ -1088,7 +1101,8 @@ public void StartConnectLoginWithOptions(ExternalCredentialType externalCredenti
10881101
var loginOptions = new Epic.OnlineServices.Connect.LoginOptions();
10891102
loginOptions.Credentials = new Epic.OnlineServices.Connect.Credentials
10901103
{
1091-
Token = token, Type = externalCredentialType
1104+
Token = token,
1105+
Type = externalCredentialType
10921106
};
10931107

10941108
switch (externalCredentialType)
@@ -1100,7 +1114,8 @@ public void StartConnectLoginWithOptions(ExternalCredentialType externalCredenti
11001114
{
11011115
loginOptions.UserLoginInfo = new UserLoginInfo
11021116
{
1103-
DisplayName = displayname, NsaIdToken = nsaIdToken,
1117+
DisplayName = displayname,
1118+
NsaIdToken = nsaIdToken,
11041119
};
11051120
}
11061121

@@ -1166,7 +1181,8 @@ public void StartConnectLoginWithDeviceToken(string displayName, OnConnectLoginC
11661181

11671182
connectLoginOptions.Credentials = new Epic.OnlineServices.Connect.Credentials
11681183
{
1169-
Token = null, Type = ExternalCredentialType.DeviceidAccessToken,
1184+
Token = null,
1185+
Type = ExternalCredentialType.DeviceidAccessToken,
11701186
};
11711187

11721188
StartConnectLoginWithOptions(connectLoginOptions, onLoginCallback);
@@ -1694,13 +1710,13 @@ public void OnApplicationPause(bool isPaused)
16941710
s_isPaused = isPaused;
16951711
print($"EOSSingleton.OnApplicationPause: IsPaused {wasPaused} -> {s_isPaused}");
16961712

1697-
// // Poll for the latest application constrained state as we're about
1698-
// // to need it to determine the appropriate EOS application status
1699-
//#if UNITY_PS4 || UNITY_GAMECORE_XBOXONE || UNITY_GAMECORE_SCARLETT
1700-
// UpdateApplicationConstrainedState(false);
1701-
//#else
1702-
// UpdateApplicationConstrainedState(true);
1703-
//#endif
1713+
// // Poll for the latest application constrained state as we're about
1714+
// // to need it to determine the appropriate EOS application status
1715+
//#if UNITY_PS4 || UNITY_GAMECORE_XBOXONE || UNITY_GAMECORE_SCARLETT
1716+
// UpdateApplicationConstrainedState(false);
1717+
//#else
1718+
// UpdateApplicationConstrainedState(true);
1719+
//#endif
17041720
}
17051721

17061722
//-------------------------------------------------------------------------
@@ -1710,13 +1726,13 @@ public void OnApplicationFocus(bool hasFocus)
17101726
s_hasFocus = hasFocus;
17111727
print($"EOSSingleton.OnApplicationFocus: HasFocus {hadFocus} -> {s_hasFocus}");
17121728

1713-
// // Poll for the latest application constrained state as we're about
1714-
// // to need it to determine the appropriate EOS application status
1715-
//#if UNITY_PS4 || UNITY_GAMECORE_XBOXONE || UNITY_GAMECORE_SCARLETT
1716-
// UpdateApplicationConstrainedState(false);
1717-
//#else
1718-
// UpdateApplicationConstrainedState(true);
1719-
//#endif
1729+
// // Poll for the latest application constrained state as we're about
1730+
// // to need it to determine the appropriate EOS application status
1731+
//#if UNITY_PS4 || UNITY_GAMECORE_XBOXONE || UNITY_GAMECORE_SCARLETT
1732+
// UpdateApplicationConstrainedState(false);
1733+
//#else
1734+
// UpdateApplicationConstrainedState(true);
1735+
//#endif
17201736
}
17211737

17221738
//-------------------------------------------------------------------------

Assets/Plugins/Source/Core/EOSPackageInfo.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public static class EOSPackageInfo
3535
* not involve editing source code files.
3636
*/
3737

38-
public const string Version = "3.2.1";
38+
public const string Version = "3.3.0";
3939

4040
public const string PackageName = "com.playeveryware.eos";
4141
}
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
/*
2+
* Copyright (c) 2024 PlayEveryWare
3+
*
4+
* Permission is hereby granted, free of charge, to any person obtaining a copy
5+
* of this software and associated documentation files (the "Software"), to deal
6+
* in the Software without restriction, including without limitation the rights
7+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8+
* copies of the Software, and to permit persons to whom the Software is
9+
* furnished to do so, subject to the following conditions:
10+
*
11+
* The above copyright notice and this permission notice shall be included in
12+
* all copies or substantial portions of the Software.
13+
*
14+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20+
* SOFTWARE.
21+
*/
22+
23+
namespace PlayEveryWare.EpicOnlineServices
24+
{
25+
/// <summary>
26+
/// Interface for classes that listen to events from the Auth Interface
27+
/// within the EOS SDK.
28+
/// </summary>
29+
public interface IAuthInterfaceEventListener : IEOSOnAuthLogin, IEOSOnAuthLogout
30+
{
31+
/*
32+
* As all usages of IEOSOnAuthLogin and IEOSOnAuthLogout have been
33+
* removed and replaced with IAuthInterfaceEventListener, in a future
34+
* iteration, it could be wise to remove both interfaces, and move the
35+
* functions they define into this interface.
36+
*
37+
* In such an event, it would make sense to rename those methods as
38+
* follows:
39+
*
40+
* OnAuthLogin -> OnLogin
41+
* OnAuthLogout -> OnLogout
42+
*/
43+
}
44+
}

Assets/Plugins/Source/Core/IAuthInterfaceEventListener.cs.meta

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)