Skip to content

Commit 048c5d7

Browse files
committed
Merge branch 'development' into release-3.3.4
2 parents 0740baa + 7c5e113 commit 048c5d7

39 files changed

+414
-189
lines changed

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,10 @@
4141
# Autogenerated VS/MD/Consulo solution and project files
4242
ExportedObj/
4343
.consulo/
44-
*.csproj
44+
45+
# Only exclude csproj files in the root of the repository
46+
/*.csproj
47+
4548
*.unityproj
4649
*.sln
4750
*.suo

Assets/Plugins/Linux/Core/LinuxConfig.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,8 @@
2222

2323
namespace PlayEveryWare.EpicOnlineServices
2424
{
25-
using System;
26-
2725
// Flags specifically for Linux. Note that labels for the baser
2826
// PlatformConfig need to be specified here.
29-
[Serializable]
3027
[ConfigGroup("Linux Config", new[]
3128
{
3229
"Linux-Specific Options",

Assets/Plugins/Source/Editor/ConfigEditors/ConfigEditor.cs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
* SOFTWARE.
2121
*/
2222

23-
#if !EOS_DISABLE
2423

2524
namespace PlayEveryWare.EpicOnlineServices.Editor
2625
{
@@ -192,7 +191,7 @@ public virtual void RenderContents()
192191
}
193192
else
194193
{
195-
GUILayout.Label(GetLabelText(), EditorStyles.boldLabel);
194+
GUIEditorUtility.RenderSectionHeader(GetLabelText());
196195
GUIEditorUtility.RenderInputs(ref config);
197196
}
198197
}
@@ -252,6 +251,4 @@ public void Dispose()
252251
_animExpanded?.valueChanged.RemoveAllListeners();
253252
}
254253
}
255-
}
256-
257-
#endif
254+
}

Assets/Plugins/Source/Editor/ConfigEditors/PlatformConfigEditor.cs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@
2020
* SOFTWARE.
2121
*/
2222

23-
#if !EOS_DISABLE
24-
2523
namespace PlayEveryWare.EpicOnlineServices.Editor
2624
{
2725
using System.Linq;
@@ -59,6 +57,4 @@ public override sealed void RenderContents()
5957
GUIEditorUtility.RenderInputs(ref config);
6058
}
6159
}
62-
}
63-
64-
#endif
60+
}

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ namespace PlayEveryWare.EpicOnlineServices.Editor.Windows
2727
#if !EOS_DISABLE
2828
using Epic.OnlineServices.UI;
2929
#endif
30-
using PlayEveryWare.EpicOnlineServices.Extensions;
3130
using PlayEveryWare.EpicOnlineServices.Utility;
3231
using System;
3332
using System.Collections.Generic;
@@ -365,15 +364,15 @@ private void OnDefaultGUI()
365364
}
366365
}
367366

368-
if (!mainEOSConfigFile.IsEncryptionKeyValid())
367+
#if !EOS_DISABLE
368+
if (!EOSClientCredentials.IsEncryptionKeyValid(mainEOSConfigFile.encryptionKey))
369369
{
370370
int keyLength = mainEOSConfigFile.encryptionKey?.Length ?? 0;
371371
EditorGUILayout.HelpBox(
372372
"Used for Player Data Storage and Title Storage. Must be left blank if unused. Encryption key must be 64 hex characters (0-9,A-F). Current length is " +
373373
keyLength + ".", MessageType.Warning);
374374
}
375375

376-
#if !EOS_DISABLE
377376
GUIEditorUtility.AssigningEnumField(
378377
"Platform Flags",
379378
ref mainEOSConfigFile.platformOptionsFlags,

Assets/Plugins/Source/Editor/Platforms/Windows/WindowsBuilder.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ namespace PlayEveryWare.EpicOnlineServices.Editor.Build
2424
{
2525
#if !EOS_DISABLE
2626
using Epic.OnlineServices.Platform;
27+
using Extensions;
2728
#endif
2829
using Config;
29-
using Extensions;
3030
using Config = EpicOnlineServices.Config;
3131
using System.IO;
3232
using UnityEditor;

Assets/Plugins/Source/Editor/Utility/GUIEditorUtility.cs

Lines changed: 30 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,11 @@
2323
namespace PlayEveryWare.EpicOnlineServices.Editor.Utility
2424
{
2525
using Common;
26+
27+
#if !EOS_DISABLE
2628
using Epic.OnlineServices.Platform;
29+
#endif
30+
2731
using EpicOnlineServices.Utility;
2832
using System;
2933
using System.Collections.Generic;
@@ -263,22 +267,30 @@ public static void AssigningEnumField<T>(string label, ref T value, float labelW
263267

264268
static readonly Dictionary<Type, RenderInputDelegate> RenderInputMethods = new()
265269
{
266-
{ typeof(Deployment), (attr, val, width) => RenderInput(attr, (Deployment)val, width) },
270+
#if !EOS_DISABLE
267271
{ typeof(EOSClientCredentials), (attr, val, width) => RenderInput(attr, (EOSClientCredentials)val, width) },
268272
{ typeof(SetOfNamed<EOSClientCredentials>), (attr, val, width) => RenderInput(attr, (SetOfNamed<EOSClientCredentials>)val, width) },
273+
{ typeof(WrappedInitializeThreadAffinity), (attr, val, width) => RenderInput(attr, (WrappedInitializeThreadAffinity)val, width) },
274+
#endif
275+
{ typeof(Deployment), (attr, val, width) => RenderInput(attr, (Deployment)val, width) },
269276
{ typeof(string), (attr, val, width) => RenderInput(attr, (string)val, width) },
270277
{ typeof(ulong), (attr, val, width) => RenderInput(attr, (ulong)val, width) },
271278
{ typeof(uint), (attr, val, width) => RenderInput(attr, (uint)val, width) },
272279
{ typeof(ProductionEnvironments), (attr, val, width) => RenderInput(attr, (ProductionEnvironments)val, width) },
273280
{ typeof(float), (attr, val, width) => RenderInput(attr, (float)val, width) },
274281
{ typeof(double), (attr, val, width) => RenderInput(attr, (double)val, width) },
275-
{ typeof(WrappedInitializeThreadAffinity), (attr, val, width) => RenderInput(attr, (WrappedInitializeThreadAffinity)val, width) },
282+
276283
{ typeof(bool), (attr, val, width) => RenderInput(attr, (bool)val, width) },
277284
// Add other specific types as needed
278285
};
279286

280287
static readonly Dictionary<ConfigFieldType, FieldHandler> FieldHandlers = new()
281288
{
289+
#if !EOS_DISABLE
290+
{ ConfigFieldType.SetOfClientCredentials, HandleField<SetOfNamed<EOSClientCredentials>> },
291+
{ ConfigFieldType.ClientCredentials, HandleField<EOSClientCredentials> },
292+
{ ConfigFieldType.WrappedInitializeThreadAffinity, HandleField<WrappedInitializeThreadAffinity> },
293+
#endif
282294
{ ConfigFieldType.Text, HandleField<string> },
283295
{ ConfigFieldType.FilePath, (target, fieldDetails, getValue, setValue, labelWidth) =>
284296
HandleField<string>(target, (FilePathFieldAttribute)fieldDetails, getValue, setValue, labelWidth) },
@@ -291,12 +303,9 @@ public static void AssigningEnumField<T>(string label, ref T value, float labelW
291303
{ ConfigFieldType.Uint, HandleField<uint> },
292304
{ ConfigFieldType.Float, HandleField<float> },
293305
{ ConfigFieldType.ProductionEnvironments, HandleField<ProductionEnvironments> },
294-
{ ConfigFieldType.SetOfClientCredentials, HandleField<SetOfNamed<EOSClientCredentials>> },
295-
{ ConfigFieldType.NamedGuid, HandleField<Named<Guid>> },
306+
{ ConfigFieldType.Guid, HandleField<Named<Guid>> },
296307
{ ConfigFieldType.Version, HandleField<Version> },
297308
{ ConfigFieldType.Deployment, HandleField<Deployment> },
298-
{ ConfigFieldType.ClientCredentials, HandleField<EOSClientCredentials> },
299-
{ ConfigFieldType.WrappedInitializeThreadAffinity, HandleField<WrappedInitializeThreadAffinity> },
300309
{ ConfigFieldType.Button, HandleButtonField },
301310
{ ConfigFieldType.Enum, HandleEnumField },
302311
// Add other field types as needed
@@ -306,6 +315,7 @@ public static void AssigningEnumField<T>(string label, ref T value, float labelW
306315

307316
private static T RenderInput<T>(ConfigFieldAttribute attribute, T value, float labelWidth)
308317
{
318+
#if !EOS_DISABLE
309319
if (typeof(T) == typeof(WrappedInitializeThreadAffinity))
310320
{
311321
// Create a foldout label with a tooltip
@@ -340,6 +350,7 @@ private static T RenderInput<T>(ConfigFieldAttribute attribute, T value, float l
340350
RenderInputs(ref value);
341351
}
342352
}
353+
#endif
343354
return value;
344355
}
345356

@@ -395,15 +406,20 @@ static void HandleEnumField(
395406
setValue(target, newValue);
396407
}
397408

398-
399-
400409
delegate void FieldHandler(
401410
object target,
402411
ConfigFieldAttribute fieldDetails,
403412
Func<object, object> getValue,
404413
Action<object, object> setValue,
405414
float labelWidth);
406415

416+
public static void RenderSectionHeader(string label)
417+
{
418+
GUILayout.Label(label.ToUpper(), EditorStyles.boldLabel);
419+
Rect rect = EditorGUILayout.GetControlRect(false, 1); // Set the height to 1 pixel
420+
EditorGUI.DrawRect(rect, Color.gray);
421+
}
422+
407423
/// <summary>
408424
/// Render the config fields for the config that has been set to edit.
409425
/// </summary>
@@ -696,7 +712,7 @@ private static void RenderSetOfNamed<T>(
696712
Action<Rect, Named<T>> renderItemFn,
697713
Action addNewItemFn,
698714
Action<Named<T>> removeItemFn
699-
) where T : IEquatable<T>
715+
) where T : IEquatable<T>, new()
700716
{
701717
List<Named<T>> items = value.ToList();
702718

@@ -867,6 +883,7 @@ private static Version VersionField(Version value, params GUILayoutOption[] opti
867883
return Version.TryParse(tempStringVersion, out Version newValue) ? newValue : value;
868884
}
869885

886+
#if !EOS_DISABLE
870887
public static EOSClientCredentials RenderInput(ConfigFieldAttribute configFieldAttribute,
871888
EOSClientCredentials value,
872889
float labelWidth)
@@ -897,6 +914,7 @@ public static EOSClientCredentials RenderInput(ConfigFieldAttribute configFieldA
897914
return (newIndex >= 0 && newIndex < credentials.Count) ? credentials[newIndex].Value : value;
898915
});
899916
}
917+
#endif
900918

901919
public static Deployment RenderInput(ConfigFieldAttribute configFieldAttribute, Deployment value, float labelWidth)
902920
{
@@ -942,6 +960,7 @@ public static Version RenderInput(ConfigFieldAttribute configFieldAttribute, Ver
942960
VersionField);
943961
}
944962

963+
#if !EOS_DISABLE
945964
public static SetOfNamed<EOSClientCredentials> RenderInput(ConfigFieldAttribute configFieldAttribute,
946965
SetOfNamed<EOSClientCredentials> value, float labelWidth)
947966
{
@@ -1001,6 +1020,7 @@ public static WrappedInitializeThreadAffinity RenderInput(ConfigFieldAttribute a
10011020
RenderInputs(ref value);
10021021
return value;
10031022
}
1023+
#endif
10041024

10051025
public static ProductionEnvironments RenderInput(ConfigFieldAttribute configFieldAttribute,
10061026
ProductionEnvironments value, float labelWidth)
@@ -1030,25 +1050,6 @@ public static ProductionEnvironments RenderInput(ConfigFieldAttribute configFiel
10301050
return value;
10311051
}
10321052

1033-
public static Named<Guid> RenderInput(ConfigFieldAttribute configFieldDetails, Named<Guid> value,
1034-
float labelWidth)
1035-
{
1036-
EditorGUILayout.LabelField(CreateGUIContent(configFieldDetails.Label, configFieldDetails.ToolTip));
1037-
1038-
GUILayout.BeginHorizontal();
1039-
1040-
value ??= new Named<Guid>();
1041-
1042-
value.Name = RenderFieldWithHint(EditorGUILayout.TextField, string.IsNullOrEmpty, value.Name,
1043-
"Product Name");
1044-
1045-
value.Value = RenderFieldWithHint(GuidField, guid => guid.Equals(Guid.Empty), value.Value, "Product Id");
1046-
1047-
GUILayout.EndHorizontal();
1048-
1049-
return value;
1050-
}
1051-
10521053
public static List<string> RenderInput(ConfigFieldAttribute configFieldDetails, List<string> value,
10531054
float labelWidth)
10541055
{
@@ -1229,6 +1230,6 @@ private static T InputRendererWrapper<T>(string label, string toolTip, float lab
12291230
});
12301231
}
12311232

1232-
#endregion
1233+
#endregion
12331234
}
12341235
}

Assets/Plugins/Source/Editor/Utility/PackageFileUtility.cs

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,19 +20,18 @@
2020
* SOFTWARE.
2121
*/
2222

23-
using System.Collections.Generic;
24-
using UnityEngine;
25-
using System.IO;
26-
using System;
27-
using System.Text.RegularExpressions;
28-
2923
namespace PlayEveryWare.EpicOnlineServices.Utility
3024
{
3125
using Common.Extensions;
3226
using Editor.Build;
27+
using System;
28+
using System.Collections.Generic;
29+
using System.IO;
3330
using System.Linq;
31+
using System.Text.RegularExpressions;
3432
using System.Threading;
3533
using System.Threading.Tasks;
34+
using UnityEngine;
3635

3736
internal class PackageFileUtility
3837
{
@@ -143,7 +142,7 @@ public static List<FileInfoMatchingResult> FindPackageFiles(string root, Package
143142
private static IEnumerable<FileInfoMatchingResult> FindMatchingFiles(string root, string currentWorkingDir, SrcDestPair pair)
144143
{
145144
IEnumerable<string> collectedFiles;
146-
145+
147146
string searchPattern = pair.src;
148147
string path = root;
149148

@@ -288,7 +287,7 @@ public static async Task CopyFilesToDirectory(
288287

289288
// Copy the files
290289
await FileSystemUtility.CopyFilesAsync(copyOperations, cancellationToken, progress);
291-
290+
292291
// Execute callback
293292
postProcessCallback?.Invoke(destination);
294293
}

Assets/Plugins/Windows/Core/WindowsConfig.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ namespace PlayEveryWare.EpicOnlineServices
2525
using System;
2626

2727
// Flags specifically for Windows
28-
[Serializable]
2928
[ConfigGroup("Windows Config", new[]
3029
{
3130
"Windows-Specific Options",

Assets/Plugins/iOS/Core/IOSConfig.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,8 @@
2222

2323
namespace PlayEveryWare.EpicOnlineServices
2424
{
25-
using System;
26-
2725
// Flags specifically for iOS. Note that labels for the baser
2826
// PlatformConfig need to be specified here.
29-
[Serializable]
3027
[ConfigGroup("EOS Config", new[]
3128
{
3229
"iOS-Specific Options",

0 commit comments

Comments
 (0)