Skip to content

Commit 982122c

Browse files
committed
fix: Correct conditions where the scripting define EOS_DISABLE is defined for the player.
1 parent 0c67e88 commit 982122c

File tree

7 files changed

+36
-10
lines changed

7 files changed

+36
-10
lines changed

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,9 @@
2424

2525
namespace PlayEveryWare.EpicOnlineServices.Editor.Windows
2626
{
27+
#if !EOS_DISABLE
2728
using Epic.OnlineServices.UI;
29+
#endif
2830
using PlayEveryWare.EpicOnlineServices.Extensions;
2931
using PlayEveryWare.EpicOnlineServices.Utility;
3032
using System;
@@ -111,7 +113,7 @@ private string GenerateEOSGeneratedFile(EOSConfig aEOSConfig)
111113
#define PLATFORM_32BITS 1
112114
#endif
113115
114-
extern ""C"" __declspec(dllexport) char* __stdcall GetConfigAsJSONString()
116+
extern ""C"" __declspec(dllexport) char* __stdcall GetConfigAsJSONString()
115117
{
116118
return ""{""
117119
""productName:"" EOS_PRODUCT_NAME "",""
@@ -351,13 +353,15 @@ private void OnDefaultGUI()
351353
ref mainEOSConfigFile.alwaysSendInputToOverlay, 190,
352354
"If true, the plugin will always send input to the overlay from the C# side to native, and handle showing the overlay. This doesn't always mean input makes it to the EOS SDK.");
353355

356+
#if !EOS_DISABLE
354357
InputStateButtonFlags toggleFriendsButtonCombinationEnum = mainEOSConfigFile.GetToggleFriendsButtonCombinationFlags();
355358
GUIEditorUtility.AssigningEnumField<InputStateButtonFlags>("Default Activate Overlay Button",
356359
ref toggleFriendsButtonCombinationEnum, 190,
357360
"Users can press the button(s) associated with this value to activate the Epic Social Overlay. Not all combinations are valid; the SDK will log an error at the start of runtime if an invalid combination is selected.");
358361
mainEOSConfigFile.toggleFriendsButtonCombination = EnumUtility<InputStateButtonFlags>.GetEnumerator(toggleFriendsButtonCombinationEnum)
359362
.Select(enumValue => enumValue.ToString())
360363
.ToList();
364+
#endif
361365
}
362366

363367
protected override void RenderWindow()

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

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,14 @@ namespace PlayEveryWare.EpicOnlineServices
2929
using Epic.OnlineServices.Auth;
3030
using Epic.OnlineServices.Platform;
3131
using Epic.OnlineServices.IntegratedPlatform;
32+
using Epic.OnlineServices.UI;
3233
#endif
3334
using System;
3435
using System.Collections.Generic;
3536
using UnityEngine;
3637
using System.Text.RegularExpressions;
3738
using Extensions;
38-
using Epic.OnlineServices.UI;
39+
3940
using PlayEveryWare.EpicOnlineServices.Utility;
4041

4142
/// <summary>
@@ -344,9 +345,13 @@ protected EOSConfig() : base("EpicOnlineServicesConfig.json")
344345
/// use that value if this configuration field is null, empty, or contains
345346
/// only <see cref="InputStateButtonFlags.None"/>.
346347
/// </summary>
347-
public List<string> toggleFriendsButtonCombination = new List<string>() { InputStateButtonFlags.SpecialLeft.ToString() };
348+
public List<string> toggleFriendsButtonCombination = new List<string>() {
349+
#if !EOS_DISABLE
350+
InputStateButtonFlags.SpecialLeft.ToString()
351+
#endif
352+
};
348353

349-
#endregion
354+
#endregion
350355

351356
public static Regex InvalidEncryptionKeyRegex;
352357

com.playeveryware.eos/Runtime/Core/EOS_SDK_Additions/EventHandlers.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@
2121
*
2222
*/
2323

24+
#if !EOS_DISABLE
25+
2426
namespace PlayEveryWare.EpicOnlineServices.Events
2527
{
2628
using Epic.OnlineServices;
@@ -32,4 +34,6 @@ namespace PlayEveryWare.EpicOnlineServices.Events
3234
/// <param name="result">Result enum (defined within the EOS SDK).</param>
3335
// ReSharper disable once InconsistentNaming
3436
public delegate void EOSResultEventHandler(Result result);
35-
}
37+
}
38+
39+
#endif

com.playeveryware.eos/Runtime/Core/EOS_SDK_Additions/FileRequestTransferWrapper.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@
2121
*
2222
*/
2323

24+
#if !EOS_DISABLE
25+
2426
namespace PlayEveryWare.EpicOnlineServices
2527
{
2628
using Epic.OnlineServices;
@@ -157,4 +159,6 @@ protected void Dispose(bool disposing)
157159
_disposed = true;
158160
}
159161
}
160-
}
162+
}
163+
164+
#endif

com.playeveryware.eos/Runtime/Core/EOS_SDK_Additions/IFileTransferRequest.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
*
2222
*/
2323

24+
#if !EOS_DISABLE
2425
namespace PlayEveryWare.EpicOnlineServices
2526
{
2627
using Epic.OnlineServices;
@@ -31,4 +32,5 @@ public interface IFileTransferRequest : IDisposable
3132
public Result CancelRequest();
3233
public void Release();
3334
}
34-
}
35+
}
36+
#endif

com.playeveryware.eos/Runtime/Core/EOS_SDK_Additions/PlayerDataStorageFileTransferRequestWrapper.cs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,12 @@
2121
*
2222
*/
2323

24+
#if !EOS_DISABLE
25+
2426
namespace PlayEveryWare.EpicOnlineServices
2527
{
2628
using Epic.OnlineServices;
2729
using Epic.OnlineServices.PlayerDataStorage;
28-
using System;
2930

3031
/// <summary>
3132
/// Used to wrap the PlayerDataStorageFileTransferRequest class provided by
@@ -57,4 +58,6 @@ public override void Release()
5758
_instance = null;
5859
}
5960
}
60-
}
61+
}
62+
63+
#endif

com.playeveryware.eos/Runtime/Core/EOS_SDK_Additions/TitleStorageFileTransferRequestWrapper.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@
2121
*
2222
*/
2323

24+
#if !EOS_DISABLE
25+
2426
namespace PlayEveryWare.EpicOnlineServices
2527
{
2628
using Epic.OnlineServices;
@@ -56,4 +58,6 @@ public override void Release()
5658
_instance = null;
5759
}
5860
}
59-
}
61+
}
62+
63+
#endif

0 commit comments

Comments
 (0)