Skip to content

Commit 082c9a1

Browse files
Merge pull request #1158 from EOS-Contrib/EOS-Disable-Fix
v4.0.2
2 parents a176548 + d409d7b commit 082c9a1

File tree

6 files changed

+91
-40
lines changed

6 files changed

+91
-40
lines changed

Assets/Plugins/Source/Editor/EditorWindows/EncryptionKeyWindow.cs

Lines changed: 26 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,16 @@ public EncryptionKeyWindow() : base("Client Credential Encryption Key", 600f, 50
4848
/// </param>
4949
public static void Show(string input, Action<string> onSubmitCallback)
5050
{
51-
ScheduleShow<EncryptionKeyWindow>(
52-
input,
53-
onSubmitCallback,
54-
EOSClientCredentials.IsEncryptionKeyValid,
55-
"Enter the encryption key for these client credentials here:",
56-
"Invalid encryption key. Encryption key must be 64 characters long and contain only alphanumeric characters.");
51+
#if !EOS_DISABLE
52+
ScheduleShow<EncryptionKeyWindow>(
53+
input,
54+
onSubmitCallback,
55+
EOSClientCredentials.IsEncryptionKeyValid,
56+
"Enter the encryption key for these client credentials here:",
57+
"Invalid encryption key. Encryption key must be 64 characters long and contain only alphanumeric characters.");
58+
#else
59+
Debug.LogWarning("EOS SDK is disabled. Encryption key window is not available.");
60+
#endif
5761
}
5862

5963
/// <summary>
@@ -63,16 +67,25 @@ protected override void RenderModalContents()
6367
{
6468
GUILayout.BeginHorizontal();
6569

66-
_input = GUILayout.TextField(_input, GUILayout.Width(GUIEditorUtility.MeasureLabelWidth(64)), GUILayout.Height(20));
70+
_input = GUILayout.TextField(
71+
_input,
72+
GUILayout.Width(EditorStyles.label.CalcSize(new GUIContent("Encryption Key")).x),
73+
GUILayout.Height(20));
6774

6875
GUILayout.Space(5f);
6976

70-
if (GUILayout.Button(
71-
new GUIContent(EditorGUIUtility.IconContent("Refresh").image,
72-
"Click here to generate a new encryption key."), GUILayout.Height(20), GUILayout.Width(50)))
73-
{
74-
_input = EOSClientCredentials.GenerateEncryptionKey();
75-
}
77+
#if !EOS_DISABLE
78+
if (GUILayout.Button(
79+
new GUIContent(EditorGUIUtility.IconContent("Refresh").image,
80+
"Click here to generate a new encryption key."),
81+
GUILayout.Height(20), GUILayout.Width(50)))
82+
{
83+
_input = EOSClientCredentials.GenerateEncryptionKey();
84+
}
85+
#else
86+
GUILayout.Label("EOS SDK is disabled.");
87+
#endif
88+
7689
GUILayout.EndHorizontal();
7790
}
7891
}

Assets/Plugins/Source/Editor/EditorWindows/ModalEOSEditorWindow.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -189,9 +189,7 @@ protected override void RenderWindow()
189189
bool shouldClose = false;
190190

191191
// Render the prompt text
192-
EditorGUILayout.LabelField(_inputPrompt, GUILayout.Width(
193-
GUIEditorUtility.MeasureLabelWidth(_inputPrompt))
194-
);
192+
EditorGUILayout.LabelField(_inputPrompt, GUILayout.Width(EditorStyles.label.CalcSize(new GUIContent(_inputPrompt)).x));
195193

196194
// Display error if it needs to be displayed.
197195
if (_showError)

com.playeveryware.eos/CHANGELOG.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,18 @@
11
# Changelog
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).
4+
## [4.0.2] - 2025-06-17
5+
6+
### Changed
7+
- EOS Disable fix
8+
- Config.cs fix for console support
49

510
## [4.0.1] - 2025-02-14
611

712
### Changed
813
- update to EOS SDK 1.17.0- HF
914

10-
## [3.3.6] - 2025-02-03
15+
1116
## [4.0.0] - 2025-02-14
1217

1318
### Changed

com.playeveryware.eos/Runtime/Core/EOSManager.cs

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -184,17 +184,7 @@ enum EOSState
184184
static private bool s_isConstrained = true;
185185
static public bool ApplicationIsConstrained { get => s_isConstrained; }
186186

187-
/// <summary>
188-
/// Actions that need to be executed on the main thread.
189-
/// Lazy allocated in <see cref="DispatchAsync"/>.
190-
/// </summary>
191-
private static List<Action> s_enqueuedTasks;
192187

193-
/// <summary>
194-
/// Locak object used for <see cref="s_enqueuedTasks"/>, such that it can
195-
/// be executed thread-safe way.
196-
/// </summary>
197-
private static System.Object s_enqueuedTasksLock = new System.Object();
198188
//private static List
199189

200190
//-------------------------------------------------------------------------
@@ -1844,6 +1834,18 @@ static public EOSSingleton Instance
18441834
}
18451835
}
18461836

1837+
/// <summary>
1838+
/// Actions that need to be executed on the main thread.
1839+
/// Lazy allocated in <see cref="DispatchAsync"/>.
1840+
/// </summary>
1841+
private static List<Action> s_enqueuedTasks;
1842+
1843+
/// <summary>
1844+
/// Locak object used for <see cref="s_enqueuedTasks"/>, such that it can
1845+
/// be executed thread-safe way.
1846+
/// </summary>
1847+
private static System.Object s_enqueuedTasksLock = new System.Object();
1848+
18471849
#if !EOS_DISABLE
18481850
//-------------------------------------------------------------------------
18491851
/// <summary>Unity [Awake](https://docs.unity3d.com/ScriptReference/MonoBehaviour.Awake.html) is called when script instance is being loaded.

com.playeveryware.eos/Runtime/EOS_SDK/Core/Config.cs

Lines changed: 45 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,16 @@
88
#define EOS_EDITOR
99
#endif
1010

11-
#if UNITY_EDITOR || UNITY_STANDALONE || UNITY_PS4 || UNITY_XBOXONE || UNITY_SWITCH || UNITY_IOS || UNITY_ANDROID
12-
#define EOS_UNITY
11+
#if UNITY_EDITOR || UNITY_STANDALONE || UNITY_PS4 || UNITY_PS5 || UNITY_XBOXONE || UNITY_SWITCH || UNITY_IOS || UNITY_ANDROID || UNITY_WSA
12+
#define EOS_UNITY
1313
#endif
1414

15-
#if UNITY_EDITOR_WIN || UNITY_STANDALONE_WIN || PLATFORM_64BITS || PLATFORM_32BITS
16-
#if UNITY_EDITOR_WIN || UNITY_64 || PLATFORM_64BITS
17-
#define EOS_PLATFORM_WINDOWS_64
18-
#else
19-
#define EOS_PLATFORM_WINDOWS_32
20-
#endif
15+
#if UNITY_EDITOR_WIN || UNITY_STANDALONE_WIN || PLATFORM_64BITS || PLATFORM_32BITS || UNITY_WSA
16+
#if UNITY_EDITOR_WIN || UNITY_64 || UNITY_EDITOR_64 || PLATFORM_64BITS || UNITY_WSA
17+
#define EOS_PLATFORM_WINDOWS_64
18+
#else
19+
#define EOS_PLATFORM_WINDOWS_32
20+
#endif
2121

2222
#elif UNITY_EDITOR_OSX || UNITY_STANDALONE_OSX
2323
#define EOS_PLATFORM_OSX
@@ -28,6 +28,14 @@
2828
#elif UNITY_PS4
2929
#define EOS_PLATFORM_PS4
3030

31+
#elif UNITY_PS5
32+
#define EOS_PLATFORM_PS5
33+
34+
#elif UNITY_GAMECORE_XBOXONE
35+
#define EOS_PLATFORM_XBOXONE_GDK
36+
37+
#elif UNITY_GAMECORE_SCARLETT
38+
#define EOS_PLATFORM_XSX
3139
#elif UNITY_XBOXONE
3240
#define EOS_PLATFORM_XBOXONE
3341

@@ -46,8 +54,11 @@
4654

4755
namespace Epic.OnlineServices
4856
{
49-
public static class Config
57+
58+
public static partial class Config
5059
{
60+
61+
#if EOS_PLATFORM_WINDOWS_32 || EOS_PLATFORM_WINDOWS_64 || EOS_PLATFORM_OSX || EOS_PLATFORM_LINUX || EOS_PLATFORM_IOS || EOS_PLATFORM_ANDROID
5162
public const string LibraryName =
5263
#if EOS_PLATFORM_WINDOWS_32 && EOS_UNITY
5364
"EOSSDK-Win32-Shipping"
@@ -77,13 +88,35 @@ public static class Config
7788
#elif EOS_PLATFORM_ANDROID
7889
"EOSSDK"
7990

80-
#else
81-
#error Unable to determine the name of the EOSSDK library. Ensure you have set the correct EOS compilation symbol for the current platform, such as EOS_PLATFORM_WINDOWS_32 or EOS_PLATFORM_WINDOWS_64, so that the correct EOSSDK library can be targeted.
91+
#elif EOS_PLATFORM_PS4
92+
#if EOS_PLATFORM_PS4_CROSSGEN
93+
"EOSSDKCrossgen-PS4-Shipping.prx"
94+
#else
95+
"EOSSDK-PS4-Shipping.prx"
96+
#endif
97+
#elif EOS_PLATFORM_PS5
98+
"EOSSDK-PS5-Shipping.prx"
99+
100+
#elif EOS_PLATFORM_SWITCH
101+
"EOSSDK-Switch-Shipping"
102+
103+
#elif EOS_PLATFORM_XBOXONE_GDK
104+
"EOSSDK-XboxOneGDK-Shipping"
105+
106+
#elif EOS_PLATFORM_XSX
107+
"EOSSDK-XSX-Shipping"
108+
109+
#elif EOS_DISABLE
110+
#warning Disabling EOS
111+
112+
#else
113+
#error Unable to determine the name of the EOSSDK library. Ensure you have set the correct EOS compilation symbol for the current platform, such as EOS_PLATFORM_WINDOWS_32 or EOS_PLATFORM_WINDOWS_64, so that the correct EOSSDK library can be targeted.
82114
"EOSSDK-UnknownPlatform-Shipping"
83115

84116
#endif
85117
;
86-
118+
#endif
119+
// PEW: End modify
87120
public const CallingConvention LibraryCallingConvention =
88121
#if EOS_PLATFORM_WINDOWS_32
89122
CallingConvention.StdCall

com.playeveryware.eos/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "com.playeveryware.eos",
3-
"version": "4.0.1",
3+
"version": "4.0.2",
44
"unity": "2021.3",
55
"unityRelease": "16f1",
66
"author": {

0 commit comments

Comments
 (0)