Skip to content

Commit 94f4801

Browse files
committed
Release 3.3.4
1 parent 4bc8349 commit 94f4801

File tree

66 files changed

+671
-269
lines changed

Some content is hidden

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

66 files changed

+671
-269
lines changed

CHANGELOG.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,22 @@
22
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
33
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
44

5+
## [3.3.4] - 2024-11-26
6+
7+
### Changed
8+
9+
- Update to EOS SDK 1.14.3.
10+
11+
### Added
12+
13+
- feat: EOSManager can have UserLoginInfo Provided to it
14+
- feat: Authentication Listener knows the difference between a Connect and Auth login
15+
16+
### Fixed
17+
18+
- fix: Add isolated changes that address the Android thread IO issue.
19+
- fix: Correct usage of FileSystemUtility in the IOSBuilder.
20+
521
## [3.3.3] - 2024-09-19
622

723
### Added

Editor/Platforms/iOS/IOSBuilder.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
#if !EOS_DISABLE
2323
namespace PlayEveryWare.EpicOnlineServices.Editor.Build
2424
{
25+
using EpicOnlineServices.Utility;
2526
using System.IO;
2627
using UnityEditor;
2728
using UnityEditor.Build.Reporting;
@@ -60,7 +61,7 @@ public override void PostBuild(BuildReport report)
6061

6162
PBXProject proj = new();
6263

63-
proj.ReadFromString(FileUtility.ReadAllText(projPath));
64+
proj.ReadFromString(FileSystemUtility.ReadAllText(projPath));
6465

6566
string targetGUID = proj.GetUnityMainTargetGuid();
6667
string unityTargetGUID = proj.GetUnityFrameworkTargetGuid();
Binary file not shown.
Binary file not shown.
Lines changed: 46 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,65 @@
11
/*
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 all
12-
* 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-
*/
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 all
12+
* 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+
*/
2222

2323
namespace PlayEveryWare.EpicOnlineServices
2424
{
2525
using System;
26+
using System.IO;
2627
using System.Threading.Tasks;
2728
using UnityEngine;
2829
using UnityEngine.Networking;
2930

3031
public class AndroidFileIOHelper
3132
{
32-
public static async Task<string> ReadAllText(string filePath)
33+
public static bool FileExists(string filePath)
3334
{
3435
using UnityWebRequest request = UnityWebRequest.Get(filePath);
35-
request.timeout = 2; //seconds till timeout
36-
UnityWebRequestAsyncOperation operation = request.SendWebRequest();
36+
request.timeout = 2;
37+
request.SendWebRequest();
38+
while (!request.isDone) { }
39+
40+
bool exists = (request.result == UnityWebRequest.Result.Success);
3741

38-
while (!operation.isDone)
42+
if (!exists)
3943
{
40-
await Task.Yield();
44+
Debug.LogError($"AndroidFileIOHelper says that \"{filePath}\" does not exist.");
4145
}
4246

47+
return exists;
48+
}
49+
50+
public static string ReadAllText(string filePath)
51+
{
52+
using UnityWebRequest request = UnityWebRequest.Get(filePath);
53+
request.timeout = 2; //seconds till timeout
54+
request.SendWebRequest();
55+
56+
while (!request.isDone) { }
57+
58+
return ProcessRequest(filePath, request);
59+
}
60+
61+
private static string ProcessRequest(string filePath, UnityWebRequest request)
62+
{
4363
string text = null;
4464

4565
switch (request.result)
@@ -72,4 +92,4 @@ public static async Task<string> ReadAllText(string filePath)
7292
return text;
7393
}
7494
}
75-
}
95+
}

Runtime/Core/AuthenticationListener.cs

Lines changed: 29 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,28 @@ namespace PlayEveryWare.EpicOnlineServices
3434
/// </summary>
3535
public class AuthenticationListener: IAuthInterfaceEventListener, IConnectInterfaceEventListener, IDisposable
3636
{
37+
/// <summary>
38+
/// Identifies the kind of authentication change.
39+
/// </summary>
40+
public enum LoginChangeKind
41+
{
42+
/// <summary>
43+
/// Represents a login change relating to the Auth-login type with EOS.
44+
/// A user logged in with the Auth Interface has access to Epic
45+
/// Account Services (EAS) operations.
46+
/// </summary>
47+
Auth,
48+
49+
/// <summary>
50+
/// Represents a login change relating to the Connect-login type with EOS.
51+
/// A user logged in with the Connect Interface has access to all
52+
/// EOS Game Services.
53+
/// Typically a user will be logged in to Auth and then afterwards
54+
/// logged in to Connect.
55+
/// </summary>
56+
Connect
57+
}
58+
3759
/// <summary>
3860
/// Used to describe functions that handle change in authentication
3961
/// state.
@@ -42,7 +64,7 @@ public class AuthenticationListener: IAuthInterfaceEventListener, IConnectInterf
4264
/// True if the authentication state has changed to authenticated, False
4365
/// otherwise.
4466
/// </param>
45-
public delegate void AuthenticationChangedEventHandler(bool authenticated);
67+
public delegate void AuthenticationChangedEventHandler(bool authenticated, LoginChangeKind changeType);
4668

4769
/// <summary>
4870
/// Event that triggers when the state of authentication has changed.
@@ -104,7 +126,8 @@ public bool IsAuthenticated
104126
/// </summary>
105127
/// <param name="attemptedState"></param>
106128
/// <param name="attemptResult"></param>
107-
private void TriggerAuthenticationChangedEvent(bool attemptedState, Result attemptResult)
129+
/// <param name="changeType">The type of authentication change.</param>
130+
private void TriggerAuthenticationChangedEvent(bool attemptedState, Result attemptResult, LoginChangeKind changeType)
108131
{
109132
// If the attempt to change the state of authentication did not
110133
// succeed, then log a warning and stop.
@@ -119,7 +142,7 @@ private void TriggerAuthenticationChangedEvent(bool attemptedState, Result attem
119142

120143
// Trigger the event indicating that the state of authentication for
121144
// the user has changed.
122-
AuthenticationChanged?.Invoke(attemptedState);
145+
AuthenticationChanged?.Invoke(attemptedState, changeType);
123146
}
124147

125148
/// <summary>
@@ -130,7 +153,7 @@ private void TriggerAuthenticationChangedEvent(bool attemptedState, Result attem
130153
/// </param>
131154
public void OnAuthLogin(LoginCallbackInfo loginCallbackInfo)
132155
{
133-
TriggerAuthenticationChangedEvent(true, loginCallbackInfo.ResultCode);
156+
TriggerAuthenticationChangedEvent(true, loginCallbackInfo.ResultCode, LoginChangeKind.Auth);
134157
}
135158

136159
/// <summary>
@@ -141,7 +164,7 @@ public void OnAuthLogin(LoginCallbackInfo loginCallbackInfo)
141164
/// </param>
142165
public void OnAuthLogout(LogoutCallbackInfo logoutCallbackInfo)
143166
{
144-
TriggerAuthenticationChangedEvent(false, logoutCallbackInfo.ResultCode);
167+
TriggerAuthenticationChangedEvent(false, logoutCallbackInfo.ResultCode, LoginChangeKind.Auth);
145168
}
146169

147170
/// <summary>
@@ -152,7 +175,7 @@ public void OnAuthLogout(LogoutCallbackInfo logoutCallbackInfo)
152175
/// </param>
153176
public void OnConnectLogin(Epic.OnlineServices.Connect.LoginCallbackInfo loginCallbackInfo)
154177
{
155-
TriggerAuthenticationChangedEvent(true, loginCallbackInfo.ResultCode);
178+
TriggerAuthenticationChangedEvent(true, loginCallbackInfo.ResultCode, LoginChangeKind.Connect);
156179
}
157180

158181
/// <summary>

0 commit comments

Comments
 (0)