Skip to content

Commit

Permalink
Merge pull request #1038 from PlayEveryWare/release-3.3.4
Browse files Browse the repository at this point in the history
Release 3.3.4
  • Loading branch information
arthur740212 authored Dec 3, 2024
2 parents d8f4c9e + 5e85a6e commit e8856b2
Show file tree
Hide file tree
Showing 90 changed files with 743 additions and 438 deletions.
72 changes: 46 additions & 26 deletions Assets/Plugins/Android/Core/AndroidFileIOHelper.cs
Original file line number Diff line number Diff line change
@@ -1,45 +1,65 @@
/*
* Copyright (c) 2024 PlayEveryWare
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
* Copyright (c) 2024 PlayEveryWare
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/

namespace PlayEveryWare.EpicOnlineServices
{
using System;
using System.IO;
using System.Threading.Tasks;
using UnityEngine;
using UnityEngine.Networking;

public class AndroidFileIOHelper
{
public static async Task<string> ReadAllText(string filePath)
public static bool FileExists(string filePath)
{
using UnityWebRequest request = UnityWebRequest.Get(filePath);
request.timeout = 2; //seconds till timeout
UnityWebRequestAsyncOperation operation = request.SendWebRequest();
request.timeout = 2;
request.SendWebRequest();
while (!request.isDone) { }

bool exists = (request.result == UnityWebRequest.Result.Success);

while (!operation.isDone)
if (!exists)
{
await Task.Yield();
Debug.LogError($"AndroidFileIOHelper says that \"{filePath}\" does not exist.");
}

return exists;
}

public static string ReadAllText(string filePath)
{
using UnityWebRequest request = UnityWebRequest.Get(filePath);
request.timeout = 2; //seconds till timeout
request.SendWebRequest();

while (!request.isDone) { }

return ProcessRequest(filePath, request);
}

private static string ProcessRequest(string filePath, UnityWebRequest request)
{
string text = null;

switch (request.result)
Expand Down Expand Up @@ -72,4 +92,4 @@ public static async Task<string> ReadAllText(string filePath)
return text;
}
}
}
}
4 changes: 2 additions & 2 deletions Assets/Plugins/Linux/libEOSSDK-Linux-Shipping.so
Git LFS file not shown
3 changes: 2 additions & 1 deletion Assets/Plugins/Source/Editor/Platforms/iOS/IOSBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#if !EOS_DISABLE
namespace PlayEveryWare.EpicOnlineServices.Editor.Build
{
using EpicOnlineServices.Utility;
using System.IO;
using UnityEditor;
using UnityEditor.Build.Reporting;
Expand Down Expand Up @@ -60,7 +61,7 @@ public override void PostBuild(BuildReport report)

PBXProject proj = new();

proj.ReadFromString(FileUtility.ReadAllText(projPath));
proj.ReadFromString(FileSystemUtility.ReadAllText(projPath));

string targetGUID = proj.GetUnityMainTargetGuid();
string unityTargetGUID = proj.GetUnityFrameworkTargetGuid();
Expand Down
Git LFS file not shown
4 changes: 2 additions & 2 deletions Assets/Plugins/Windows/x64/EOSSDK-Win64-Shipping.dll
Git LFS file not shown
4 changes: 2 additions & 2 deletions Assets/Plugins/Windows/x64/GfxPluginNativeRender-x64.dll
Git LFS file not shown
4 changes: 2 additions & 2 deletions Assets/Plugins/Windows/x86/DynamicLibraryLoaderHelper-x86.dll
Git LFS file not shown
4 changes: 2 additions & 2 deletions Assets/Plugins/Windows/x86/EOSSDK-Win32-Shipping.dll
Git LFS file not shown
4 changes: 2 additions & 2 deletions Assets/Plugins/Windows/x86/GfxPluginNativeRender-x86.dll
Git LFS file not shown
4 changes: 2 additions & 2 deletions Assets/Plugins/iOS/EOSSDK.framework/EOSSDK
Git LFS file not shown
2 changes: 1 addition & 1 deletion Assets/Plugins/iOS/EOSSDK.framework/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
<key>DTXcodeBuild</key>
<string>9M174d</string>
<key>MinimumOSVersion</key>
<string>11.0</string>
<string>12.0</string>
<key>UIDeviceFamily</key>
<array>
<integer>1</integer>
Expand Down
4 changes: 2 additions & 2 deletions Assets/Plugins/macOS/MicrophoneUtility_macos.dylib
Git LFS file not shown
4 changes: 2 additions & 2 deletions Assets/Plugins/macOS/libDynamicLibraryLoaderHelper.dylib
Git LFS file not shown
4 changes: 2 additions & 2 deletions Assets/Plugins/macOS/libEOSSDK-Mac-Shipping.dylib
Git LFS file not shown
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ private static string ProductUserIdToString(ProductUserId productUserId)
return buffer;
}

protected async override void OnLoggedIn()
protected async override void OnLoggedIn(AuthenticationListener.LoginChangeKind changeType)
{
await RefreshAsync();
}
Expand Down
12 changes: 7 additions & 5 deletions Assets/Scripts/StandardSamples/Services/EOSService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -159,30 +159,32 @@ protected bool TryGetProductUserId(out ProductUserId productUserId)

}

private void OnAuthenticationChanged(bool authenticated)
private void OnAuthenticationChanged(bool authenticated, AuthenticationListener.LoginChangeKind changeType)
{
if (authenticated)
{
OnLoggedIn();
OnLoggedIn(changeType);
}
else
{
OnLoggedOut();
OnLoggedOut(changeType);
}
}

/// <summary>
/// Implement this method to perform tasks when a user authenticates.
/// By default, there is no action taken.
/// </summary>
protected virtual void OnLoggedIn() { }
/// <param name="changeType">The type of authentication change.</param>
protected virtual void OnLoggedIn(AuthenticationListener.LoginChangeKind changeType) { }

/// <summary>
/// If there are tasks that need to be done when logged out, consider
/// overriding the Reset() function as that is where such things should
/// be done.
/// </summary>
protected void OnLoggedOut()
/// <param name="changeType">The type of authentication change.</param>
protected void OnLoggedOut(AuthenticationListener.LoginChangeKind changeType)
{
Reset();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -372,9 +372,12 @@ private void FinishFileUpload(string fileName, Action fileUploadCallback = null)
/// <list type="bullet">
/// <item><description><c>QueryFileList()</c></description></item>
/// </list>
protected override void OnLoggedIn()
protected override void OnLoggedIn(AuthenticationListener.LoginChangeKind changeType)
{
QueryFileList();
if (changeType == AuthenticationListener.LoginChangeKind.Connect)
{
QueryFileList();
}
}

protected override Task InternalRefreshAsync()
Expand Down
2 changes: 1 addition & 1 deletion Assets/Scripts/StandardSamples/Services/StatsService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ private static void Log(string toPrint)
UnityEngine.Debug.Log(toPrint);
}

protected async override void OnLoggedIn()
protected async override void OnLoggedIn(AuthenticationListener.LoginChangeKind changeType)
{
if (TryGetProductUserId(out ProductUserId userId))
{
Expand Down
4 changes: 3 additions & 1 deletion Assets/Scripts/StandardSamples/UI/Common/SampleMenu.cs
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,9 @@ protected SampleMenu(bool startsHidden = true, bool requiresAuthentication = tru
/// <param name="authenticated">
/// True if the state has changed to authenticated, false otherwise.
/// </param>
private void OnAuthenticationChanged(bool authenticated)
/// <param name="authenticationChangeType">
/// What kind of authentication change this is.</param>
private void OnAuthenticationChanged(bool authenticated, AuthenticationListener.LoginChangeKind authenticationChangeType)
{
if (authenticated || !RequiresAuthentication)
{
Expand Down
19 changes: 1 addition & 18 deletions Assets/StreamingAssets/EOS/EpicOnlineServicesConfig.json
Original file line number Diff line number Diff line change
@@ -1,18 +1 @@
{
"productName": "EOS Plugin for Unity",
"productVersion": "1.0",
"productID": "f7102b835ed14b5fb6b3a05d87b3d101",
"sandboxID": "ab139ee5b644412781cf99f48b993b45",
"deploymentID": "c529498f660a4a3d8a123fd04552cb47",
"clientSecret": "aXPlP1xDH0PXnp5U+i+M5pYHhaE1a8viV0l1GO422ms",
"clientID": "xyza7891wPzGRvRf4SkjlIF8YuqlRLbQ",
"encryptionKey": "1111111111111111111111111111111111111111111111111111111111111111",
"platformOptionsFlags": [
""
],
"tickBudgetInMilliseconds": 0,
"alwaysSendInputToOverlay": true,
"initialButtonDelayForOverlay": "",
"repeatButtonDelayForOverlay": "",
"hackForceSendInputDirectlyToSDK": false
}
{"productName":"EOS Plugin for Unity","productVersion":"1.0","productID":"f7102b835ed14b5fb6b3a05d87b3d101","sandboxID":"ab139ee5b644412781cf99f48b993b45","deploymentID":"c529498f660a4a3d8a123fd04552cb47","sandboxDeploymentOverrides":[],"isServer":false,"clientSecret":"aXPlP1xDH0PXnp5U+i+M5pYHhaE1a8viV0l1GO422ms","clientID":"xyza7891wPzGRvRf4SkjlIF8YuqlRLbQ","encryptionKey":"1111111111111111111111111111111111111111111111111111111111111111","platformOptionsFlags":[""],"authScopeOptionsFlags":[""],"tickBudgetInMilliseconds":0,"taskNetworkTimeoutSeconds":0.0,"ThreadAffinity_networkWork":"","ThreadAffinity_storageIO":"","ThreadAffinity_webSocketIO":"","ThreadAffinity_P2PIO":"","ThreadAffinity_HTTPRequestIO":"","ThreadAffinity_RTCIO":"","alwaysSendInputToOverlay":true,"initialButtonDelayForOverlay":"","repeatButtonDelayForOverlay":"","hackForceSendInputDirectlyToSDK":false,"toggleFriendsButtonCombination":["SpecialLeft"]}
22 changes: 1 addition & 21 deletions Assets/StreamingAssets/EOS/eos_android_config.json
Original file line number Diff line number Diff line change
@@ -1,21 +1 @@
{
"flags": [],
"overrideValues": {
"productName": "",
"productVersion": "",
"productID": "",
"sandboxID": "",
"deploymentID": "",
"clientSecret": "",
"clientID": "",
"encryptionKey": "",
"platformOptionsFlags": [
""
],
"tickBudgetInMilliseconds": 0,
"alwaysSendInputToOverlay": false,
"initialButtonDelayForOverlay": "",
"repeatButtonDelayForOverlay": "",
"hackForceSendInputDirectlyToSDK": false
}
}
{"overrideValues":{"productName":"","productVersion":"","productID":"","sandboxID":"","deploymentID":"","sandboxDeploymentOverrides":[],"isServer":false,"clientSecret":"","clientID":"","encryptionKey":"","platformOptionsFlags":[""],"authScopeOptionsFlags":[],"tickBudgetInMilliseconds":0,"taskNetworkTimeoutSeconds":0.0,"ThreadAffinity_networkWork":"","ThreadAffinity_storageIO":"","ThreadAffinity_webSocketIO":"","ThreadAffinity_P2PIO":"","ThreadAffinity_HTTPRequestIO":"","ThreadAffinity_RTCIO":"","alwaysSendInputToOverlay":false,"initialButtonDelayForOverlay":"","repeatButtonDelayForOverlay":"","hackForceSendInputDirectlyToSDK":false,"toggleFriendsButtonCombination":["SpecialLeft"]},"flags":[""]}
22 changes: 1 addition & 21 deletions Assets/StreamingAssets/EOS/eos_ios_config.json
Original file line number Diff line number Diff line change
@@ -1,21 +1 @@
{
"flags": [],
"overrideValues": {
"productName": "",
"productVersion": "",
"productID": "",
"sandboxID": "",
"deploymentID": "",
"clientSecret": "",
"clientID": "",
"encryptionKey": "",
"platformOptionsFlags": [
""
],
"tickBudgetInMilliseconds": 0,
"alwaysSendInputToOverlay": false,
"initialButtonDelayForOverlay": "",
"repeatButtonDelayForOverlay": "",
"hackForceSendInputDirectlyToSDK": false
}
}
{"overrideValues":{"productName":"","productVersion":"","productID":"","sandboxID":"","deploymentID":"","sandboxDeploymentOverrides":[],"isServer":false,"clientSecret":"","clientID":"","encryptionKey":"","platformOptionsFlags":[""],"authScopeOptionsFlags":[],"tickBudgetInMilliseconds":0,"taskNetworkTimeoutSeconds":0.0,"ThreadAffinity_networkWork":"","ThreadAffinity_storageIO":"","ThreadAffinity_webSocketIO":"","ThreadAffinity_P2PIO":"","ThreadAffinity_HTTPRequestIO":"","ThreadAffinity_RTCIO":"","alwaysSendInputToOverlay":false,"initialButtonDelayForOverlay":"","repeatButtonDelayForOverlay":"","hackForceSendInputDirectlyToSDK":false,"toggleFriendsButtonCombination":["SpecialLeft"]},"flags":[]}
28 changes: 1 addition & 27 deletions Assets/StreamingAssets/EOS/eos_linux_config.json
Original file line number Diff line number Diff line change
@@ -1,27 +1 @@
{
"flags": [],
"overrideValues": {
"productName": "",
"productVersion": "",
"productID": "",
"sandboxID": "",
"deploymentID": "",
"clientSecret": "",
"clientID": "",
"encryptionKey": "",
"platformOptionsFlags": [
""
],
"tickBudgetInMilliseconds": 0,
"ThreadAffinity_networkWork": "",
"ThreadAffinity_storageIO": "",
"ThreadAffinity_webSocketIO": "",
"ThreadAffinity_P2PIO": "",
"ThreadAffinity_HTTPRequestIO": "",
"ThreadAffinity_RTCIO": "",
"alwaysSendInputToOverlay": false,
"initialButtonDelayForOverlay": "",
"repeatButtonDelayForOverlay": "",
"hackForceSendInputDirectlyToSDK": false
}
}
{"overrideValues":{"productName":"","productVersion":"","productID":"","sandboxID":"","deploymentID":"","sandboxDeploymentOverrides":[],"isServer":false,"clientSecret":"","clientID":"","encryptionKey":"","platformOptionsFlags":[""],"authScopeOptionsFlags":[],"tickBudgetInMilliseconds":0,"taskNetworkTimeoutSeconds":0.0,"ThreadAffinity_networkWork":"","ThreadAffinity_storageIO":"","ThreadAffinity_webSocketIO":"","ThreadAffinity_P2PIO":"","ThreadAffinity_HTTPRequestIO":"","ThreadAffinity_RTCIO":"","alwaysSendInputToOverlay":false,"initialButtonDelayForOverlay":"","repeatButtonDelayForOverlay":"","hackForceSendInputDirectlyToSDK":false,"toggleFriendsButtonCombination":["SpecialLeft"]},"flags":[]}
16 changes: 16 additions & 0 deletions com.playeveryware.eos/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,22 @@
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [3.3.4] - 2024-11-26

### Changed

- Update to EOS SDK 1.14.3.

### Added

- feat: EOSManager can have UserLoginInfo Provided to it
- feat: Authentication Listener knows the difference between a Connect and Auth login

### Fixed

- fix: Add isolated changes that address the Android thread IO issue.
- fix: Correct usage of FileSystemUtility in the IOSBuilder.

## [3.3.3] - 2024-09-19

### Added
Expand Down
Loading

0 comments on commit e8856b2

Please sign in to comment.