did some more work on networking and removed EOS in favor of LRM

did some more work on networking and removed EOS in favor of Light Reflective Mirror
This commit is contained in:
Mikolaj 2022-05-31 15:04:31 +02:00
parent 0aaed2513b
commit 2bbacbea09
5465 changed files with 341565 additions and 89075 deletions

View file

@ -1,59 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &2209092976737935735
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 901605347204557884}
- component: {fileID: 1404666848870070223}
m_Layer: 0
m_Name: EOSManager
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &901605347204557884
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2209092976737935735}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &1404666848870070223
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2209092976737935735}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 016d8460ff2ae644db4fc92d25ce1a79, type: 3}
m_Name:
m_EditorClassIdentifier:
apiKeys: {fileID: 11400000, guid: bc676c2f8679fc348bdd5b0422e4f235, type: 2}
authInterfaceLogin: 0
authInterfaceCredentialType: 6
devAuthToolPort: 7878
devAuthToolCredentialName:
connectInterfaceCredentialType: 0
deviceModel: PC Windows 64bit
displayName: User
epicLoggerLevel: 200
collectPlayerMetrics: 1
checkForEpicLauncherAndRestart: 0
delayedInitialization: 1
platformTickIntervalInSeconds: 0
tickBudgetInMilliseconds: 0

View file

@ -1,7 +0,0 @@
fileFormatVersion: 2
guid: 023dc204246f92344887fd8ce2ea894c
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -1,21 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 2006c7a2843279e4598781ed39185dd0, type: 3}
m_Name: EosApiKey
m_EditorClassIdentifier:
epicProductName: 'Trouble in Terrorist Town: Source Crossed'
epicProductVersion: 1.0
epicProductId: cefb3408547045fcb28a9dbd58d48ed7
epicSandboxId: 739f95d42e6748379737c4ff061114c7
epicDeploymentId: ff56985eeafc4dcbbbd63a0cd079bee9
epicClientId: xyza7891oqIuT2qadgDUXnl76eBKgaI0
epicClientSecret: AfGaldrVkjgxQD6eY1PlfsejJFhNs6QXmmzDSTL4QIk

View file

@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: bc676c2f8679fc348bdd5b0422e4f235
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

214
Assets/Image.prefab Normal file
View file

@ -0,0 +1,214 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &8160286336252841090
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 8160286336252841091}
- component: {fileID: 8160286336252841093}
- component: {fileID: 8160286336252841092}
m_Layer: 0
m_Name: Image
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &8160286336252841091
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8160286336252841090}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 8160286337366833968}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 595.58, y: 60.9502}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &8160286336252841093
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8160286336252841090}
m_CullTransparentMesh: 1
--- !u!114 &8160286336252841092
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8160286336252841090}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 0.3207547, g: 0.3207547, b: 0.3207547, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 0}
m_Type: 0
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!1 &8160286337366833983
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 8160286337366833968}
- component: {fileID: 8160286337366833970}
- component: {fileID: 8160286337366833969}
m_Layer: 0
m_Name: Text (TMP)
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &8160286337366833968
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8160286337366833983}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 8160286336252841091}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 595.58, y: 50}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &8160286337366833970
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8160286337366833983}
m_CullTransparentMesh: 1
--- !u!114 &8160286337366833969
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8160286337366833983}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_text: Player [connectionId]
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
m_fontSharedMaterials: []
m_fontMaterial: {fileID: 0}
m_fontMaterials: []
m_fontColor32:
serializedVersion: 2
rgba: 4294967295
m_fontColor: {r: 1, g: 1, b: 1, a: 1}
m_enableVertexGradient: 0
m_colorMode: 3
m_fontColorGradient:
topLeft: {r: 1, g: 1, b: 1, a: 1}
topRight: {r: 1, g: 1, b: 1, a: 1}
bottomLeft: {r: 1, g: 1, b: 1, a: 1}
bottomRight: {r: 1, g: 1, b: 1, a: 1}
m_fontColorGradientPreset: {fileID: 0}
m_spriteAsset: {fileID: 0}
m_tintAllSprites: 0
m_StyleSheet: {fileID: 0}
m_TextStyleHashCode: -1183493901
m_overrideHtmlColors: 0
m_faceColor:
serializedVersion: 2
rgba: 4294967295
m_fontSize: 44.75
m_fontSizeBase: 36
m_fontWeight: 400
m_enableAutoSizing: 1
m_fontSizeMin: 18
m_fontSizeMax: 72
m_fontStyle: 0
m_HorizontalAlignment: 2
m_VerticalAlignment: 512
m_textAlignment: 65535
m_characterSpacing: 0
m_wordSpacing: 0
m_lineSpacing: 0
m_lineSpacingMax: 0
m_paragraphSpacing: 0
m_charWidthMaxAdj: 0
m_enableWordWrapping: 1
m_wordWrappingRatios: 0.4
m_overflowMode: 0
m_linkedTextComponent: {fileID: 0}
parentLinkedComponent: {fileID: 0}
m_enableKerning: 1
m_enableExtraPadding: 0
checkPaddingRequired: 0
m_isRichText: 1
m_parseCtrlCharacters: 1
m_isOrthographic: 1
m_isCullingEnabled: 0
m_horizontalMapping: 0
m_verticalMapping: 0
m_uvLineOffset: 0
m_geometrySortingOrder: 0
m_IsTextObjectScaleStatic: 0
m_VertexBufferAutoSizeReduction: 0
m_useMaxVisibleDescender: 1
m_pageToDisplay: 1
m_margin: {x: 0, y: 0, z: 0, w: 0}
m_isUsingLegacyAnimationComponent: 0
m_isVolumetricText: 0
m_hasFontAssetChanged: 0
m_baseMaterial: {fileID: 0}
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}

7
Assets/Image.prefab.meta Normal file
View file

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 774dab2b72a79fb438b18e46bf5c6f5f
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -0,0 +1,35 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: c46f07b5ed07e4e92aa78254188d3d10, type: 3}
m_Name: InputSystem.inputsettings
m_EditorClassIdentifier:
m_SupportedDevices: []
m_UpdateMode: 1
m_MaxEventBytesPerUpdate: 5242880
m_MaxQueuedEventsPerUpdate: 1000
m_CompensateForScreenOrientation: 1
m_BackgroundBehavior: 0
m_EditorInputBehaviorInPlayMode: 0
m_DefaultDeadzoneMin: 0.125
m_DefaultDeadzoneMax: 0.925
m_DefaultButtonPressPoint: 0.5
m_ButtonReleaseThreshold: 0.75
m_DefaultTapTime: 0.2
m_DefaultSlowTapTime: 0.5
m_DefaultHoldTime: 0.4
m_TapRadius: 5
m_MultiTapDelayTime: 0.75
m_DisableRedundantEventsMerging: 0
m_iOSSettings:
m_MotionUsage:
m_Enabled: 0
m_Description:

View file

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 57459ac3439177e4291e185cb9d40806
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

View file

@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: fb097379647003348b59f3423899888c
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -1,120 +0,0 @@
using System.Collections;
using System.Collections.Generic;
/// <summary>
/// Copyright
/// MIT License
///
/// Copyright Fizz Cube Ltd(c) 2018
///
/// 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 Marco Hoffmann(c) 2020
///
/// 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.
///
/// MIT License
/// </summary>
namespace EpicTransport {
public class BidirectionalDictionary<T1, T2> : IEnumerable {
private Dictionary<T1, T2> t1ToT2Dict = new Dictionary<T1, T2>();
private Dictionary<T2, T1> t2ToT1Dict = new Dictionary<T2, T1>();
public IEnumerable<T1> FirstTypes => t1ToT2Dict.Keys;
public IEnumerable<T2> SecondTypes => t2ToT1Dict.Keys;
public IEnumerator GetEnumerator() => t1ToT2Dict.GetEnumerator();
public int Count => t1ToT2Dict.Count;
public void Add(T1 key, T2 value) {
t1ToT2Dict[key] = value;
t2ToT1Dict[value] = key;
}
public void Add(T2 key, T1 value) {
t2ToT1Dict[key] = value;
t1ToT2Dict[value] = key;
}
public T2 Get(T1 key) => t1ToT2Dict[key];
public T1 Get(T2 key) => t2ToT1Dict[key];
public bool TryGetValue(T1 key, out T2 value) => t1ToT2Dict.TryGetValue(key, out value);
public bool TryGetValue(T2 key, out T1 value) => t2ToT1Dict.TryGetValue(key, out value);
public bool Contains(T1 key) => t1ToT2Dict.ContainsKey(key);
public bool Contains(T2 key) => t2ToT1Dict.ContainsKey(key);
public void Remove(T1 key) {
if (Contains(key)) {
T2 val = t1ToT2Dict[key];
t1ToT2Dict.Remove(key);
t2ToT1Dict.Remove(val);
}
}
public void Remove(T2 key) {
if (Contains(key)) {
T1 val = t2ToT1Dict[key];
t1ToT2Dict.Remove(val);
t2ToT1Dict.Remove(key);
}
}
public T1 this[T2 key] {
get => t2ToT1Dict[key];
set {
t2ToT1Dict[key] = value;
t1ToT2Dict[value] = key;
}
}
public T2 this[T1 key] {
get => t1ToT2Dict[key];
set {
t1ToT2Dict[key] = value;
t2ToT1Dict[value] = key;
}
}
}
}

View file

@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: cc6ca8a3d04a86643a1850637ea2149b
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -1,166 +0,0 @@
using Epic.OnlineServices;
using Epic.OnlineServices.P2P;
using Mirror;
using System;
using System.Threading;
using System.Threading.Tasks;
using UnityEngine;
namespace EpicTransport {
public class Client : Common {
public SocketId socketId;
public ProductUserId serverId;
public bool Connected { get; private set; }
public bool Error { get; private set; }
private event Action<byte[], int> OnReceivedData;
private event Action OnConnected;
public event Action OnDisconnected;
private TimeSpan ConnectionTimeout;
public bool isConnecting = false;
public string hostAddress = "";
private ProductUserId hostProductId = null;
private TaskCompletionSource<Task> connectedComplete;
private CancellationTokenSource cancelToken;
private Client(EosTransport transport) : base(transport) {
ConnectionTimeout = TimeSpan.FromSeconds(Math.Max(1, transport.timeout));
}
public static Client CreateClient(EosTransport transport, string host) {
Client c = new Client(transport);
c.hostAddress = host;
c.socketId = new SocketId() { SocketName = RandomString.Generate(20) };
c.OnConnected += () => transport.OnClientConnected.Invoke();
c.OnDisconnected += () => transport.OnClientDisconnected.Invoke();
c.OnReceivedData += (data, channel) => transport.OnClientDataReceived.Invoke(new ArraySegment<byte>(data), channel);
return c;
}
public async void Connect(string host) {
cancelToken = new CancellationTokenSource();
try {
hostProductId = ProductUserId.FromString(host);
serverId = hostProductId;
connectedComplete = new TaskCompletionSource<Task>();
OnConnected += SetConnectedComplete;
SendInternal(hostProductId, socketId, InternalMessages.CONNECT);
Task connectedCompleteTask = connectedComplete.Task;
if (await Task.WhenAny(connectedCompleteTask, Task.Delay(ConnectionTimeout/*, cancelToken.Token*/)) != connectedCompleteTask) {
Debug.LogError($"Connection to {host} timed out.");
OnConnected -= SetConnectedComplete;
OnConnectionFailed(hostProductId);
}
OnConnected -= SetConnectedComplete;
} catch (FormatException) {
Debug.LogError($"Connection string was not in the right format. Did you enter a ProductId?");
Error = true;
OnConnectionFailed(hostProductId);
} catch (Exception ex) {
Debug.LogError(ex.Message);
Error = true;
OnConnectionFailed(hostProductId);
} finally {
if (Error) {
OnConnectionFailed(null);
}
}
}
public void Disconnect() {
if (serverId != null) {
CloseP2PSessionWithUser(serverId, socketId);
serverId = null;
} else {
return;
}
SendInternal(hostProductId, socketId, InternalMessages.DISCONNECT);
Dispose();
cancelToken?.Cancel();
WaitForClose(hostProductId, socketId);
}
private void SetConnectedComplete() => connectedComplete.SetResult(connectedComplete.Task);
protected override void OnReceiveData(byte[] data, ProductUserId clientUserId, int channel) {
if (ignoreAllMessages) {
return;
}
if (clientUserId != hostProductId) {
Debug.LogError("Received a message from an unknown");
return;
}
OnReceivedData.Invoke(data, channel);
}
protected override void OnNewConnection(OnIncomingConnectionRequestInfo result) {
if (ignoreAllMessages) {
return;
}
if (deadSockets.Contains(result.SocketId.SocketName)) {
Debug.LogError("Received incoming connection request from dead socket");
return;
}
if (hostProductId == result.RemoteUserId) {
EOSSDKComponent.GetP2PInterface().AcceptConnection(
new AcceptConnectionOptions() {
LocalUserId = EOSSDKComponent.LocalUserProductId,
RemoteUserId = result.RemoteUserId,
SocketId = result.SocketId
});
} else {
Debug.LogError("P2P Acceptance Request from unknown host ID.");
}
}
protected override void OnReceiveInternalData(InternalMessages type, ProductUserId clientUserId, SocketId socketId) {
if (ignoreAllMessages) {
return;
}
switch (type) {
case InternalMessages.ACCEPT_CONNECT:
Connected = true;
OnConnected.Invoke();
Debug.Log("Connection established.");
break;
case InternalMessages.DISCONNECT:
Connected = false;
Debug.Log("Disconnected.");
OnDisconnected.Invoke();
break;
default:
Debug.Log("Received unknown message type");
break;
}
}
public void Send(byte[] data, int channelId) => Send(hostProductId, socketId, data, (byte) channelId);
protected override void OnConnectionFailed(ProductUserId remoteId) => OnDisconnected.Invoke();
public void EosNotInitialized() => OnDisconnected.Invoke();
}
}

View file

@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: da6dd127548ffec44bac84a182dad080
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -1,288 +0,0 @@

using Epic.OnlineServices;
using Epic.OnlineServices.P2P;
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace EpicTransport {
public abstract class Common {
private PacketReliability[] channels;
private int internal_ch => channels.Length;
protected enum InternalMessages : byte {
CONNECT,
ACCEPT_CONNECT,
DISCONNECT
}
protected struct PacketKey {
public ProductUserId productUserId;
public byte channel;
}
private OnIncomingConnectionRequestCallback OnIncomingConnectionRequest;
ulong incomingNotificationId = 0;
private OnRemoteConnectionClosedCallback OnRemoteConnectionClosed;
ulong outgoingNotificationId = 0;
protected readonly EosTransport transport;
protected List<string> deadSockets;
public bool ignoreAllMessages = false;
// Mapping from PacketKey to a List of Packet Lists
protected Dictionary<PacketKey, List<List<Packet>>> incomingPackets = new Dictionary<PacketKey, List<List<Packet>>>();
protected Common(EosTransport transport) {
channels = transport.Channels;
deadSockets = new List<string>();
AddNotifyPeerConnectionRequestOptions addNotifyPeerConnectionRequestOptions = new AddNotifyPeerConnectionRequestOptions();
addNotifyPeerConnectionRequestOptions.LocalUserId = EOSSDKComponent.LocalUserProductId;
addNotifyPeerConnectionRequestOptions.SocketId = null;
OnIncomingConnectionRequest += OnNewConnection;
OnRemoteConnectionClosed += OnConnectFail;
incomingNotificationId = EOSSDKComponent.GetP2PInterface().AddNotifyPeerConnectionRequest(addNotifyPeerConnectionRequestOptions,
null, OnIncomingConnectionRequest);
AddNotifyPeerConnectionClosedOptions addNotifyPeerConnectionClosedOptions = new AddNotifyPeerConnectionClosedOptions();
addNotifyPeerConnectionClosedOptions.LocalUserId = EOSSDKComponent.LocalUserProductId;
addNotifyPeerConnectionClosedOptions.SocketId = null;
outgoingNotificationId = EOSSDKComponent.GetP2PInterface().AddNotifyPeerConnectionClosed(addNotifyPeerConnectionClosedOptions,
null, OnRemoteConnectionClosed);
if (outgoingNotificationId == 0 || incomingNotificationId == 0) {
Debug.LogError("Couldn't bind notifications with P2P interface");
}
incomingPackets = new Dictionary<PacketKey, List<List<Packet>>>();
this.transport = transport;
}
protected void Dispose() {
EOSSDKComponent.GetP2PInterface().RemoveNotifyPeerConnectionRequest(incomingNotificationId);
EOSSDKComponent.GetP2PInterface().RemoveNotifyPeerConnectionClosed(outgoingNotificationId);
transport.ResetIgnoreMessagesAtStartUpTimer();
}
protected abstract void OnNewConnection(OnIncomingConnectionRequestInfo result);
private void OnConnectFail(OnRemoteConnectionClosedInfo result) {
if (ignoreAllMessages) {
return;
}
OnConnectionFailed(result.RemoteUserId);
switch (result.Reason) {
case ConnectionClosedReason.ClosedByLocalUser:
throw new Exception("Connection cLosed: The Connection was gracecfully closed by the local user.");
case ConnectionClosedReason.ClosedByPeer:
throw new Exception("Connection closed: The connection was gracefully closed by remote user.");
case ConnectionClosedReason.ConnectionClosed:
throw new Exception("Connection closed: The connection was unexpectedly closed.");
case ConnectionClosedReason.ConnectionFailed:
throw new Exception("Connection failed: Failled to establish connection.");
case ConnectionClosedReason.InvalidData:
throw new Exception("Connection failed: The remote user sent us invalid data..");
case ConnectionClosedReason.InvalidMessage:
throw new Exception("Connection failed: The remote user sent us an invalid message.");
case ConnectionClosedReason.NegotiationFailed:
throw new Exception("Connection failed: Negotiation failed.");
case ConnectionClosedReason.TimedOut:
throw new Exception("Connection failed: Timeout.");
case ConnectionClosedReason.TooManyConnections:
throw new Exception("Connection failed: Too many connections.");
case ConnectionClosedReason.UnexpectedError:
throw new Exception("Unexpected Error, connection will be closed");
case ConnectionClosedReason.Unknown:
default:
throw new Exception("Unknown Error, connection has been closed.");
}
}
protected void SendInternal(ProductUserId target, SocketId socketId, InternalMessages type) {
EOSSDKComponent.GetP2PInterface().SendPacket(new SendPacketOptions() {
AllowDelayedDelivery = true,
Channel = (byte) internal_ch,
Data = new byte[] { (byte) type },
LocalUserId = EOSSDKComponent.LocalUserProductId,
Reliability = PacketReliability.ReliableOrdered,
RemoteUserId = target,
SocketId = socketId
});
}
protected void Send(ProductUserId host, SocketId socketId, byte[] msgBuffer, byte channel) {
Result result = EOSSDKComponent.GetP2PInterface().SendPacket(new SendPacketOptions() {
AllowDelayedDelivery = true,
Channel = channel,
Data = msgBuffer,
LocalUserId = EOSSDKComponent.LocalUserProductId,
Reliability = channels[channel],
RemoteUserId = host,
SocketId = socketId
});
if(result != Result.Success) {
Debug.LogError("Send failed " + result);
}
}
private bool Receive(out ProductUserId clientProductUserId, out SocketId socketId, out byte[] receiveBuffer, byte channel) {
Result result = EOSSDKComponent.GetP2PInterface().ReceivePacket(new ReceivePacketOptions() {
LocalUserId = EOSSDKComponent.LocalUserProductId,
MaxDataSizeBytes = P2PInterface.MaxPacketSize,
RequestedChannel = channel
}, out clientProductUserId, out socketId, out channel, out receiveBuffer);
if (result == Result.Success) {
return true;
}
receiveBuffer = null;
clientProductUserId = null;
return false;
}
protected virtual void CloseP2PSessionWithUser(ProductUserId clientUserID, SocketId socketId) {
if (socketId == null) {
Debug.LogWarning("Socket ID == null | " + ignoreAllMessages);
return;
}
if (deadSockets == null) {
Debug.LogWarning("DeadSockets == null");
return;
}
if (deadSockets.Contains(socketId.SocketName)) {
return;
} else {
deadSockets.Add(socketId.SocketName);
}
}
protected void WaitForClose(ProductUserId clientUserID, SocketId socketId) => transport.StartCoroutine(DelayedClose(clientUserID, socketId));
private IEnumerator DelayedClose(ProductUserId clientUserID, SocketId socketId) {
yield return null;
CloseP2PSessionWithUser(clientUserID, socketId);
}
public void ReceiveData() {
try {
// Internal Channel, no fragmentation here
SocketId socketId = new SocketId();
while (transport.enabled && Receive(out ProductUserId clientUserID, out socketId, out byte[] internalMessage, (byte) internal_ch)) {
if (internalMessage.Length == 1) {
OnReceiveInternalData((InternalMessages) internalMessage[0], clientUserID, socketId);
return; // Wait one frame
} else {
Debug.Log("Incorrect package length on internal channel.");
}
}
// Insert new packet at the correct location in the incoming queue
for (int chNum = 0; chNum < channels.Length; chNum++) {
while (transport.enabled && Receive(out ProductUserId clientUserID, out socketId, out byte[] receiveBuffer, (byte) chNum)) {
PacketKey incomingPacketKey = new PacketKey();
incomingPacketKey.productUserId = clientUserID;
incomingPacketKey.channel = (byte)chNum;
Packet packet = new Packet();
packet.FromBytes(receiveBuffer);
if (!incomingPackets.ContainsKey(incomingPacketKey)) {
incomingPackets.Add(incomingPacketKey, new List<List<Packet>>());
}
int packetListIndex = incomingPackets[incomingPacketKey].Count;
for(int i = 0; i < incomingPackets[incomingPacketKey].Count; i++) {
if(incomingPackets[incomingPacketKey][i][0].id == packet.id) {
packetListIndex = i;
break;
}
}
if (packetListIndex == incomingPackets[incomingPacketKey].Count) {
incomingPackets[incomingPacketKey].Add(new List<Packet>());
}
int insertionIndex = -1;
for (int i = 0; i < incomingPackets[incomingPacketKey][packetListIndex].Count; i++) {
if (incomingPackets[incomingPacketKey][packetListIndex][i].fragment > packet.fragment) {
insertionIndex = i;
break;
}
}
if (insertionIndex >= 0) {
incomingPackets[incomingPacketKey][packetListIndex].Insert(insertionIndex, packet);
} else {
incomingPackets[incomingPacketKey][packetListIndex].Add(packet);
}
}
}
// Find fully received packets
List<List<Packet>> emptyPacketLists = new List<List<Packet>>();
foreach(KeyValuePair<PacketKey, List<List<Packet>>> keyValuePair in incomingPackets) {
for(int packetList = 0; packetList < keyValuePair.Value.Count; packetList++) {
bool packetReady = true;
int packetLength = 0;
for (int packet = 0; packet < keyValuePair.Value[packetList].Count; packet++) {
Packet tempPacket = keyValuePair.Value[packetList][packet];
if (tempPacket.fragment != packet || (packet == keyValuePair.Value[packetList].Count - 1 && tempPacket.moreFragments)) {
packetReady = false;
} else {
packetLength += tempPacket.data.Length;
}
}
if (packetReady) {
byte[] data = new byte[packetLength];
int dataIndex = 0;
for (int packet = 0; packet < keyValuePair.Value[packetList].Count; packet++) {
Array.Copy(keyValuePair.Value[packetList][packet].data, 0, data, dataIndex, keyValuePair.Value[packetList][packet].data.Length);
dataIndex += keyValuePair.Value[packetList][packet].data.Length;
}
OnReceiveData(data, keyValuePair.Key.productUserId, keyValuePair.Key.channel);
//keyValuePair.Value[packetList].Clear();
emptyPacketLists.Add(keyValuePair.Value[packetList]);
}
}
for (int i = 0; i < emptyPacketLists.Count; i++) {
keyValuePair.Value.Remove(emptyPacketLists[i]);
}
emptyPacketLists.Clear();
}
} catch (Exception e) {
Debug.LogException(e);
}
}
protected abstract void OnReceiveInternalData(InternalMessages type, ProductUserId clientUserID, SocketId socketId);
protected abstract void OnReceiveData(byte[] data, ProductUserId clientUserID, int channel);
protected abstract void OnConnectionFailed(ProductUserId remoteId);
}
}

View file

@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: c04a0117f9769fb4b81d8ef911740d95
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: 49a600a9a9638fb4e88fff9af13c2d3d
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -1,7 +0,0 @@
fileFormatVersion: 2
guid: 4f53ec12866c26441b65b00cf8e3f981
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -1,7 +0,0 @@
fileFormatVersion: 2
guid: a25dae6fc3a1b1b4e8efa054c6573d3e
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -1,3 +0,0 @@
Important:
Before unzipping create a folder that ends with '~' e.g. DevTool~
The ~ character at the end prevents unity from importing the tool as asset.

View file

@ -1,7 +0,0 @@
fileFormatVersion: 2
guid: ed009554fea298a46b541e9a00259672
TextScriptImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: ed34d0299171cfe40bcf917e23161e11
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: 605dc7d59b148ac4980b6f73567440d6
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: 8741a0cbea8377744a1a7b5d0ab1375d
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -1,32 +0,0 @@
fileFormatVersion: 2
guid: f54c64c6acf23bd4785182be70cac831
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 0
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
Android: Android
second:
enabled: 1
settings: {}
- first:
Any:
second:
enabled: 0
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
userData:
assetBundleName:
assetBundleVariant:

View file

@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: 468c59d5ae7f3844b9e9432f06693b3d
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: 30d6ace08c4f54e4e8d7c1eeecff5a32
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -1,27 +0,0 @@
fileFormatVersion: 2
guid: 532681909f6a7be418f492315f74b6b3
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 0
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
Any:
second:
enabled: 1
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
userData:
assetBundleName:
assetBundleVariant:

View file

@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: 143bec3c2bc5ade4f90d7fefd117c647
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -1,27 +0,0 @@
fileFormatVersion: 2
guid: f6ffc6c3e02e5da44a7074b723832dec
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 0
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
Any:
second:
enabled: 1
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
userData:
assetBundleName:
assetBundleVariant:

View file

@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: 964340b849000d744b32653db6bdec9f
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -1,16 +0,0 @@
// Copyright Epic Games, Inc. All Rights Reserved.
using System.Runtime.InteropServices;
namespace Epic.OnlineServices
{
internal sealed class BoxedData
{
public object Data { get; private set; }
public BoxedData(object data)
{
Data = data;
}
}
}

View file

@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 9cf28f76f76ab5b4191ed789dec5ea5c
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -1,97 +0,0 @@
// Copyright Epic Games, Inc. All Rights Reserved.
#if DEBUG
#define EOS_DEBUG
#endif
#if UNITY_EDITOR
#define EOS_EDITOR
#endif
#if UNITY_EDITOR || UNITY_STANDALONE || UNITY_PS4 || UNITY_XBOXONE || UNITY_SWITCH || UNITY_IOS || UNITY_ANDROID
#define EOS_UNITY
#endif
#if UNITY_EDITOR_WIN || UNITY_STANDALONE_WIN || PLATFORM_64BITS || PLATFORM_32BITS
#if UNITY_EDITOR_WIN || UNITY_64 || PLATFORM_64BITS
#define EOS_PLATFORM_WINDOWS_64
#else
#define EOS_PLATFORM_WINDOWS_32
#endif
#elif UNITY_EDITOR_OSX || UNITY_STANDALONE_OSX
#define EOS_PLATFORM_OSX
#elif UNITY_EDITOR_LINUX || UNITY_STANDALONE_LINUX
#define EOS_PLATFORM_LINUX
#elif UNITY_PS4
#define EOS_PLATFORM_PS4
#elif UNITY_XBOXONE
#define EOS_PLATFORM_XBOXONE
#elif UNITY_SWITCH
#define EOS_PLATFORM_SWITCH
#elif UNITY_IOS || __IOS__
#define EOS_PLATFORM_IOS
#elif UNITY_ANDROID || __ANDROID__
#define EOS_PLATFORM_ANDROID
#endif
using System.Runtime.InteropServices;
namespace Epic.OnlineServices
{
public static class Config
{
public const string LibraryName =
#if EOS_PLATFORM_WINDOWS_32 && EOS_UNITY
"EOSSDK-Win32-Shipping"
#elif EOS_PLATFORM_WINDOWS_32
"EOSSDK-Win32-Shipping.dll"
#elif EOS_PLATFORM_WINDOWS_64 && EOS_UNITY
"EOSSDK-Win64-Shipping"
#elif EOS_PLATFORM_WINDOWS_64
"EOSSDK-Win64-Shipping.dll"
#elif EOS_PLATFORM_OSX && EOS_UNITY
"libEOSSDK-Mac-Shipping"
#elif EOS_PLATFORM_OSX
"libEOSSDK-Mac-Shipping.dylib"
#elif EOS_PLATFORM_LINUX && EOS_UNITY
"libEOSSDK-Linux-Shipping.so"
#elif EOS_PLATFORM_LINUX
"libEOSSDK-Linux-Shipping.so"
#elif EOS_PLATFORM_IOS && EOS_UNITY && !EOS_EDITOR
"__Internal"
#elif EOS_PLATFORM_IOS && EOS_UNITY
"EOSSDK"
#elif EOS_PLATFORM_IOS
"EOSSDK.framework/EOSSDK"
#elif EOS_PLATFORM_ANDROID
"EOSSDK"
#else
#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.
"EOSSDK-UnknownPlatform-Shipping"
#endif
;
public const CallingConvention LibraryCallingConvention =
#if EOS_PLATFORM_WINDOWS_32
CallingConvention.StdCall
#else
CallingConvention.Cdecl
#endif
;
}
}

View file

@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 98992bf0f67075d4fa670ad6baa3bc04
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -1,70 +0,0 @@
// Copyright Epic Games, Inc. All Rights Reserved.
using System;
namespace Epic.OnlineServices
{
public abstract class Handle : IEquatable<Handle>
{
public IntPtr InnerHandle { get; internal set; }
public Handle()
{
}
public Handle(IntPtr innerHandle)
{
InnerHandle = innerHandle;
}
public override bool Equals(object obj)
{
return Equals(obj as Handle);
}
public override int GetHashCode()
{
return (int)(0x00010000 + InnerHandle.ToInt64());
}
public bool Equals(Handle other)
{
if (ReferenceEquals(other, null))
{
return false;
}
if (ReferenceEquals(this, other))
{
return true;
}
if (GetType() != other.GetType())
{
return false;
}
return InnerHandle == other.InnerHandle;
}
public static bool operator ==(Handle lhs, Handle rhs)
{
if (ReferenceEquals(lhs, null))
{
if (ReferenceEquals(rhs, null))
{
return true;
}
return false;
}
return lhs.Equals(rhs);
}
public static bool operator !=(Handle lhs, Handle rhs)
{
return !(lhs == rhs);
}
}
}

View file

@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 891c2d4ec1d130049ba03dfbec6aefa6
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 3079a103fb51b45419a94bf57a63fc8c
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -1,27 +0,0 @@
// Copyright Epic Games, Inc. All Rights Reserved.
namespace Epic.OnlineServices
{
public static class HelperExtensions
{
/// <summary>
/// Checks whether the given result indicates that the operation has completed. Some operations may callback with a result indicating that they will callback again.
/// </summary>
/// <param name="result">The result to check.</param>
/// <returns>Whether the operation has completed or not.</returns>
public static bool IsOperationComplete(this Result result)
{
return Common.IsOperationComplete(result);
}
/// <summary>
/// Converts a byte array into a hex string, e.g. "A56904FF".
/// </summary>
/// <param name="byteArray">The byte array to convert.</param>
/// <returns>A hex string, e.g. "A56904FF".</returns>
public static string ToHexString(this byte[] byteArray)
{
return Common.ToString(byteArray);
}
}
}

View file

@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: b66a27433592be448af038ba9cb57d96
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -1,18 +0,0 @@
// Copyright Epic Games, Inc. All Rights Reserved.
using System;
namespace Epic.OnlineServices
{
internal interface ICallbackInfo
{
object ClientData { get; }
Result? GetResultCode();
}
internal interface ICallbackInfoInternal
{
IntPtr ClientDataAddress { get; }
}
}

View file

@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 4aa748c37587f3248933d66e7e093816
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -1,9 +0,0 @@
// Copyright Epic Games, Inc. All Rights Reserved.
namespace Epic.OnlineServices
{
public interface ISettable
{
void Set(object other);
}
}

View file

@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: bbcedd8572e5c1f4899c4237e53f97ca
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -1,14 +0,0 @@
// Copyright Epic Games, Inc. All Rights Reserved.
using System;
namespace Epic.OnlineServices
{
[AttributeUsage(AttributeTargets.Method)]
internal sealed class MonoPInvokeCallbackAttribute : Attribute
{
public MonoPInvokeCallbackAttribute(Type type)
{
}
}
}

View file

@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: be91cddb4263e1b42ad685c6bd0e8b19
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -1,27 +0,0 @@
fileFormatVersion: 2
guid: 212a14d72c7c990469798ff9623cf288
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 0
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
Any:
second:
enabled: 1
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
userData:
assetBundleName:
assetBundleVariant:

View file

@ -1,27 +0,0 @@
fileFormatVersion: 2
guid: 488dca3331ccfce41acd3f112457f0b4
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 0
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
Any:
second:
enabled: 1
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
userData:
assetBundleName:
assetBundleVariant:

View file

@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: 3c90188131b747447af24bc49000c263
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: 1b05ad5e499f3f64093016cd0dbb0a49
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -1,668 +0,0 @@
// Copyright Epic Games, Inc. All Rights Reserved.
// This file is automatically generated. Changes to this file may be overwritten.
namespace Epic.OnlineServices.Achievements
{
public sealed partial class AchievementsInterface : Handle
{
public AchievementsInterface()
{
}
public AchievementsInterface(System.IntPtr innerHandle) : base(innerHandle)
{
}
/// <summary>
/// Timestamp value representing an undefined UnlockTime for <see cref="PlayerAchievement" /> and <see cref="UnlockedAchievement" />
/// </summary>
public const int AchievementUnlocktimeUndefined = -1;
/// <summary>
/// The most recent version of the <see cref="AddNotifyAchievementsUnlocked" /> API.
/// </summary>
public const int AddnotifyachievementsunlockedApiLatest = 1;
/// <summary>
/// The most recent version of the <see cref="AddNotifyAchievementsUnlockedV2" /> API.
/// </summary>
public const int Addnotifyachievementsunlockedv2ApiLatest = 2;
/// <summary>
/// The most recent version of the <see cref="CopyAchievementDefinitionV2ByAchievementIdOptions" /> struct.
/// </summary>
public const int Copyachievementdefinitionv2ByachievementidApiLatest = 2;
/// <summary>
/// The most recent version of the <see cref="CopyAchievementDefinitionByIndexOptions" /> struct.
/// </summary>
public const int Copyachievementdefinitionv2ByindexApiLatest = 2;
/// <summary>
/// The most recent version of the <see cref="CopyAchievementDefinitionByAchievementIdOptions" /> struct.
/// </summary>
public const int CopydefinitionbyachievementidApiLatest = 1;
/// <summary>
/// The most recent version of the <see cref="CopyAchievementDefinitionByIndexOptions" /> struct.
/// </summary>
public const int CopydefinitionbyindexApiLatest = 1;
/// <summary>
/// DEPRECATED! Use <see cref="Copyachievementdefinitionv2ByachievementidApiLatest" /> instead.
/// </summary>
public const int Copydefinitionv2ByachievementidApiLatest = Copyachievementdefinitionv2ByachievementidApiLatest;
/// <summary>
/// DEPRECATED! Use <see cref="Copyachievementdefinitionv2ByindexApiLatest" /> instead.
/// </summary>
public const int Copydefinitionv2ByindexApiLatest = Copyachievementdefinitionv2ByindexApiLatest;
/// <summary>
/// The most recent version of the <see cref="CopyPlayerAchievementByAchievementIdOptions" /> struct.
/// </summary>
public const int CopyplayerachievementbyachievementidApiLatest = 2;
/// <summary>
/// The most recent version of the <see cref="CopyPlayerAchievementByIndexOptions" /> struct.
/// </summary>
public const int CopyplayerachievementbyindexApiLatest = 2;
/// <summary>
/// The most recent version of the <see cref="CopyUnlockedAchievementByAchievementIdOptions" /> struct.
/// </summary>
public const int CopyunlockedachievementbyachievementidApiLatest = 1;
/// <summary>
/// The most recent version of the <see cref="CopyUnlockedAchievementByIndexOptions" /> struct.
/// </summary>
public const int CopyunlockedachievementbyindexApiLatest = 1;
/// <summary>
/// The most recent version of the <see cref="Definition" /> struct.
/// </summary>
public const int DefinitionApiLatest = 1;
/// <summary>
/// The most recent version of the <see cref="DefinitionV2" /> struct.
/// </summary>
public const int Definitionv2ApiLatest = 2;
/// <summary>
/// The most recent version of the <see cref="GetAchievementDefinitionCount" /> API.
/// </summary>
public const int GetachievementdefinitioncountApiLatest = 1;
/// <summary>
/// The most recent version of the <see cref="GetPlayerAchievementCount" /> API.
/// </summary>
public const int GetplayerachievementcountApiLatest = 1;
/// <summary>
/// The most recent version of the <see cref="GetUnlockedAchievementCount" /> API.
/// </summary>
public const int GetunlockedachievementcountApiLatest = 1;
/// <summary>
/// The most recent version of the <see cref="PlayerAchievement" /> struct.
/// </summary>
public const int PlayerachievementApiLatest = 2;
public const int PlayerstatinfoApiLatest = 1;
/// <summary>
/// The most recent version of the <see cref="QueryDefinitions" /> struct.
/// </summary>
public const int QuerydefinitionsApiLatest = 3;
/// <summary>
/// The most recent version of the <see cref="QueryPlayerAchievements" /> struct.
/// </summary>
public const int QueryplayerachievementsApiLatest = 2;
/// <summary>
/// DEPRECATED! Use <see cref="StatthresholdsApiLatest" /> instead.
/// </summary>
public const int StatthresholdApiLatest = StatthresholdsApiLatest;
/// <summary>
/// The most recent version of the <see cref="StatThresholds" /> struct.
/// </summary>
public const int StatthresholdsApiLatest = 1;
/// <summary>
/// The most recent version of the <see cref="UnlockAchievements" /> struct.
/// </summary>
public const int UnlockachievementsApiLatest = 1;
/// <summary>
/// The most recent version of the <see cref="UnlockedAchievement" /> struct.
/// </summary>
public const int UnlockedachievementApiLatest = 1;
/// <summary>
/// DEPRECATED! Use <see cref="AddNotifyAchievementsUnlockedV2" /> instead.
///
/// Register to receive achievement unlocked notifications.
/// @note must call <see cref="RemoveNotifyAchievementsUnlocked" /> to remove the notification
/// <seealso cref="RemoveNotifyAchievementsUnlocked" />
/// </summary>
/// <param name="options">Structure containing information about the achievement unlocked notification</param>
/// <param name="clientData">Arbitrary data that is passed back to you in the CompletionDelegate</param>
/// <param name="notificationFn">A callback that is fired when an achievement unlocked notification for a user has been received</param>
/// <returns>
/// handle representing the registered callback
/// </returns>
public ulong AddNotifyAchievementsUnlocked(AddNotifyAchievementsUnlockedOptions options, object clientData, OnAchievementsUnlockedCallback notificationFn)
{
var optionsAddress = System.IntPtr.Zero;
Helper.TryMarshalSet<AddNotifyAchievementsUnlockedOptionsInternal, AddNotifyAchievementsUnlockedOptions>(ref optionsAddress, options);
var clientDataAddress = System.IntPtr.Zero;
var notificationFnInternal = new OnAchievementsUnlockedCallbackInternal(OnAchievementsUnlockedCallbackInternalImplementation);
Helper.AddCallback(ref clientDataAddress, clientData, notificationFn, notificationFnInternal);
var funcResult = Bindings.EOS_Achievements_AddNotifyAchievementsUnlocked(InnerHandle, optionsAddress, clientDataAddress, notificationFnInternal);
Helper.TryMarshalDispose(ref optionsAddress);
Helper.TryAssignNotificationIdToCallback(clientDataAddress, funcResult);
return funcResult;
}
/// <summary>
/// Register to receive achievement unlocked notifications.
/// @note must call <see cref="RemoveNotifyAchievementsUnlocked" /> to remove the notification
/// <seealso cref="RemoveNotifyAchievementsUnlocked" />
/// </summary>
/// <param name="options">Structure containing information about the achievement unlocked notification</param>
/// <param name="clientData">Arbitrary data that is passed back to you in the CompletionDelegate</param>
/// <param name="notificationFn">A callback that is fired when an achievement unlocked notification for a user has been received</param>
/// <returns>
/// handle representing the registered callback
/// </returns>
public ulong AddNotifyAchievementsUnlockedV2(AddNotifyAchievementsUnlockedV2Options options, object clientData, OnAchievementsUnlockedCallbackV2 notificationFn)
{
var optionsAddress = System.IntPtr.Zero;
Helper.TryMarshalSet<AddNotifyAchievementsUnlockedV2OptionsInternal, AddNotifyAchievementsUnlockedV2Options>(ref optionsAddress, options);
var clientDataAddress = System.IntPtr.Zero;
var notificationFnInternal = new OnAchievementsUnlockedCallbackV2Internal(OnAchievementsUnlockedCallbackV2InternalImplementation);
Helper.AddCallback(ref clientDataAddress, clientData, notificationFn, notificationFnInternal);
var funcResult = Bindings.EOS_Achievements_AddNotifyAchievementsUnlockedV2(InnerHandle, optionsAddress, clientDataAddress, notificationFnInternal);
Helper.TryMarshalDispose(ref optionsAddress);
Helper.TryAssignNotificationIdToCallback(clientDataAddress, funcResult);
return funcResult;
}
/// <summary>
/// DEPRECATED! Use <see cref="CopyAchievementDefinitionV2ByAchievementId" /> instead.
///
/// Fetches an achievement definition from a given achievement ID.
/// <seealso cref="Release" />
/// <seealso cref="CopyAchievementDefinitionV2ByAchievementId" />
/// </summary>
/// <param name="options">Structure containing the achievement ID being accessed</param>
/// <param name="outDefinition">The achievement definition for the given achievement ID, if it exists and is valid, use <see cref="Release" /> when finished</param>
/// <returns>
/// <see cref="Result.Success" /> if the information is available and passed out in OutDefinition
/// <see cref="Result.InvalidParameters" /> if you pass a null pointer for the out parameter
/// <see cref="Result.NotFound" /> if the achievement definition is not found
/// </returns>
public Result CopyAchievementDefinitionByAchievementId(CopyAchievementDefinitionByAchievementIdOptions options, out Definition outDefinition)
{
var optionsAddress = System.IntPtr.Zero;
Helper.TryMarshalSet<CopyAchievementDefinitionByAchievementIdOptionsInternal, CopyAchievementDefinitionByAchievementIdOptions>(ref optionsAddress, options);
var outDefinitionAddress = System.IntPtr.Zero;
var funcResult = Bindings.EOS_Achievements_CopyAchievementDefinitionByAchievementId(InnerHandle, optionsAddress, ref outDefinitionAddress);
Helper.TryMarshalDispose(ref optionsAddress);
if (Helper.TryMarshalGet<DefinitionInternal, Definition>(outDefinitionAddress, out outDefinition))
{
Bindings.EOS_Achievements_Definition_Release(outDefinitionAddress);
}
return funcResult;
}
/// <summary>
/// DEPRECATED! Use <see cref="CopyAchievementDefinitionV2ByIndex" /> instead.
///
/// Fetches an achievement definition from a given index.
/// <seealso cref="CopyAchievementDefinitionV2ByIndex" />
/// <seealso cref="Release" />
/// </summary>
/// <param name="options">Structure containing the index being accessed</param>
/// <param name="outDefinition">The achievement definition for the given index, if it exists and is valid, use <see cref="Release" /> when finished</param>
/// <returns>
/// <see cref="Result.Success" /> if the information is available and passed out in OutDefinition
/// <see cref="Result.InvalidParameters" /> if you pass a null pointer for the out parameter
/// <see cref="Result.NotFound" /> if the achievement definition is not found
/// </returns>
public Result CopyAchievementDefinitionByIndex(CopyAchievementDefinitionByIndexOptions options, out Definition outDefinition)
{
var optionsAddress = System.IntPtr.Zero;
Helper.TryMarshalSet<CopyAchievementDefinitionByIndexOptionsInternal, CopyAchievementDefinitionByIndexOptions>(ref optionsAddress, options);
var outDefinitionAddress = System.IntPtr.Zero;
var funcResult = Bindings.EOS_Achievements_CopyAchievementDefinitionByIndex(InnerHandle, optionsAddress, ref outDefinitionAddress);
Helper.TryMarshalDispose(ref optionsAddress);
if (Helper.TryMarshalGet<DefinitionInternal, Definition>(outDefinitionAddress, out outDefinition))
{
Bindings.EOS_Achievements_Definition_Release(outDefinitionAddress);
}
return funcResult;
}
/// <summary>
/// Fetches an achievement definition from a given achievement ID.
/// <seealso cref="Release" />
/// </summary>
/// <param name="options">Structure containing the achievement ID being accessed</param>
/// <param name="outDefinition">The achievement definition for the given achievement ID, if it exists and is valid, use <see cref="Release" /> when finished</param>
/// <returns>
/// <see cref="Result.Success" /> if the information is available and passed out in OutDefinition
/// <see cref="Result.InvalidParameters" /> if you pass a null pointer for the out parameter
/// <see cref="Result.NotFound" /> if the achievement definition is not found
/// <see cref="Result.InvalidProductUserID" /> if any of the userid options are incorrect
/// </returns>
public Result CopyAchievementDefinitionV2ByAchievementId(CopyAchievementDefinitionV2ByAchievementIdOptions options, out DefinitionV2 outDefinition)
{
var optionsAddress = System.IntPtr.Zero;
Helper.TryMarshalSet<CopyAchievementDefinitionV2ByAchievementIdOptionsInternal, CopyAchievementDefinitionV2ByAchievementIdOptions>(ref optionsAddress, options);
var outDefinitionAddress = System.IntPtr.Zero;
var funcResult = Bindings.EOS_Achievements_CopyAchievementDefinitionV2ByAchievementId(InnerHandle, optionsAddress, ref outDefinitionAddress);
Helper.TryMarshalDispose(ref optionsAddress);
if (Helper.TryMarshalGet<DefinitionV2Internal, DefinitionV2>(outDefinitionAddress, out outDefinition))
{
Bindings.EOS_Achievements_DefinitionV2_Release(outDefinitionAddress);
}
return funcResult;
}
/// <summary>
/// Fetches an achievement definition from a given index.
/// <seealso cref="Release" />
/// </summary>
/// <param name="options">Structure containing the index being accessed</param>
/// <param name="outDefinition">The achievement definition for the given index, if it exists and is valid, use <see cref="Release" /> when finished</param>
/// <returns>
/// <see cref="Result.Success" /> if the information is available and passed out in OutDefinition
/// <see cref="Result.InvalidParameters" /> if you pass a null pointer for the out parameter
/// <see cref="Result.NotFound" /> if the achievement definition is not found
/// <see cref="Result.InvalidProductUserID" /> if any of the userid options are incorrect
/// </returns>
public Result CopyAchievementDefinitionV2ByIndex(CopyAchievementDefinitionV2ByIndexOptions options, out DefinitionV2 outDefinition)
{
var optionsAddress = System.IntPtr.Zero;
Helper.TryMarshalSet<CopyAchievementDefinitionV2ByIndexOptionsInternal, CopyAchievementDefinitionV2ByIndexOptions>(ref optionsAddress, options);
var outDefinitionAddress = System.IntPtr.Zero;
var funcResult = Bindings.EOS_Achievements_CopyAchievementDefinitionV2ByIndex(InnerHandle, optionsAddress, ref outDefinitionAddress);
Helper.TryMarshalDispose(ref optionsAddress);
if (Helper.TryMarshalGet<DefinitionV2Internal, DefinitionV2>(outDefinitionAddress, out outDefinition))
{
Bindings.EOS_Achievements_DefinitionV2_Release(outDefinitionAddress);
}
return funcResult;
}
/// <summary>
/// Fetches a player achievement from a given achievement ID.
/// <seealso cref="Release" />
/// </summary>
/// <param name="options">Structure containing the Epic Online Services Account ID and achievement ID being accessed</param>
/// <param name="outAchievement">The player achievement data for the given achievement ID, if it exists and is valid, use <see cref="Release" /> when finished</param>
/// <returns>
/// <see cref="Result.Success" /> if the information is available and passed out in OutAchievement
/// <see cref="Result.InvalidParameters" /> if you pass a null pointer for the out parameter
/// <see cref="Result.NotFound" /> if the player achievement is not found
/// <see cref="Result.InvalidProductUserID" /> if you pass an invalid user ID
/// </returns>
public Result CopyPlayerAchievementByAchievementId(CopyPlayerAchievementByAchievementIdOptions options, out PlayerAchievement outAchievement)
{
var optionsAddress = System.IntPtr.Zero;
Helper.TryMarshalSet<CopyPlayerAchievementByAchievementIdOptionsInternal, CopyPlayerAchievementByAchievementIdOptions>(ref optionsAddress, options);
var outAchievementAddress = System.IntPtr.Zero;
var funcResult = Bindings.EOS_Achievements_CopyPlayerAchievementByAchievementId(InnerHandle, optionsAddress, ref outAchievementAddress);
Helper.TryMarshalDispose(ref optionsAddress);
if (Helper.TryMarshalGet<PlayerAchievementInternal, PlayerAchievement>(outAchievementAddress, out outAchievement))
{
Bindings.EOS_Achievements_PlayerAchievement_Release(outAchievementAddress);
}
return funcResult;
}
/// <summary>
/// Fetches a player achievement from a given index.
/// <seealso cref="Release" />
/// </summary>
/// <param name="options">Structure containing the Epic Online Services Account ID and index being accessed</param>
/// <param name="outAchievement">The player achievement data for the given index, if it exists and is valid, use <see cref="Release" /> when finished</param>
/// <returns>
/// <see cref="Result.Success" /> if the information is available and passed out in OutAchievement
/// <see cref="Result.InvalidParameters" /> if you pass a null pointer for the out parameter
/// <see cref="Result.NotFound" /> if the player achievement is not found
/// <see cref="Result.InvalidProductUserID" /> if you pass an invalid user ID
/// </returns>
public Result CopyPlayerAchievementByIndex(CopyPlayerAchievementByIndexOptions options, out PlayerAchievement outAchievement)
{
var optionsAddress = System.IntPtr.Zero;
Helper.TryMarshalSet<CopyPlayerAchievementByIndexOptionsInternal, CopyPlayerAchievementByIndexOptions>(ref optionsAddress, options);
var outAchievementAddress = System.IntPtr.Zero;
var funcResult = Bindings.EOS_Achievements_CopyPlayerAchievementByIndex(InnerHandle, optionsAddress, ref outAchievementAddress);
Helper.TryMarshalDispose(ref optionsAddress);
if (Helper.TryMarshalGet<PlayerAchievementInternal, PlayerAchievement>(outAchievementAddress, out outAchievement))
{
Bindings.EOS_Achievements_PlayerAchievement_Release(outAchievementAddress);
}
return funcResult;
}
/// <summary>
/// DEPRECATED! Use <see cref="CopyPlayerAchievementByAchievementId" /> instead.
///
/// Fetches an unlocked achievement from a given achievement ID.
/// <seealso cref="Release" />
/// </summary>
/// <param name="options">Structure containing the Epic Online Services Account ID and achievement ID being accessed</param>
/// <param name="outAchievement">The unlocked achievement data for the given achievement ID, if it exists and is valid, use <see cref="Release" /> when finished</param>
/// <returns>
/// <see cref="Result.Success" /> if the information is available and passed out in OutAchievement
/// <see cref="Result.InvalidParameters" /> if you pass a null pointer for the out parameter
/// <see cref="Result.NotFound" /> if the unlocked achievement is not found
/// </returns>
public Result CopyUnlockedAchievementByAchievementId(CopyUnlockedAchievementByAchievementIdOptions options, out UnlockedAchievement outAchievement)
{
var optionsAddress = System.IntPtr.Zero;
Helper.TryMarshalSet<CopyUnlockedAchievementByAchievementIdOptionsInternal, CopyUnlockedAchievementByAchievementIdOptions>(ref optionsAddress, options);
var outAchievementAddress = System.IntPtr.Zero;
var funcResult = Bindings.EOS_Achievements_CopyUnlockedAchievementByAchievementId(InnerHandle, optionsAddress, ref outAchievementAddress);
Helper.TryMarshalDispose(ref optionsAddress);
if (Helper.TryMarshalGet<UnlockedAchievementInternal, UnlockedAchievement>(outAchievementAddress, out outAchievement))
{
Bindings.EOS_Achievements_UnlockedAchievement_Release(outAchievementAddress);
}
return funcResult;
}
/// <summary>
/// DEPRECATED! Use <see cref="CopyPlayerAchievementByAchievementId" /> instead.
///
/// Fetches an unlocked achievement from a given index.
/// <seealso cref="Release" />
/// </summary>
/// <param name="options">Structure containing the Epic Online Services Account ID and index being accessed</param>
/// <param name="outAchievement">The unlocked achievement data for the given index, if it exists and is valid, use <see cref="Release" /> when finished</param>
/// <returns>
/// <see cref="Result.Success" /> if the information is available and passed out in OutAchievement
/// <see cref="Result.InvalidParameters" /> if you pass a null pointer for the out parameter
/// <see cref="Result.NotFound" /> if the unlocked achievement is not found
/// </returns>
public Result CopyUnlockedAchievementByIndex(CopyUnlockedAchievementByIndexOptions options, out UnlockedAchievement outAchievement)
{
var optionsAddress = System.IntPtr.Zero;
Helper.TryMarshalSet<CopyUnlockedAchievementByIndexOptionsInternal, CopyUnlockedAchievementByIndexOptions>(ref optionsAddress, options);
var outAchievementAddress = System.IntPtr.Zero;
var funcResult = Bindings.EOS_Achievements_CopyUnlockedAchievementByIndex(InnerHandle, optionsAddress, ref outAchievementAddress);
Helper.TryMarshalDispose(ref optionsAddress);
if (Helper.TryMarshalGet<UnlockedAchievementInternal, UnlockedAchievement>(outAchievementAddress, out outAchievement))
{
Bindings.EOS_Achievements_UnlockedAchievement_Release(outAchievementAddress);
}
return funcResult;
}
/// <summary>
/// Fetch the number of achievement definitions that are cached locally.
/// <seealso cref="CopyAchievementDefinitionByIndex" />
/// </summary>
/// <param name="options">The Options associated with retrieving the achievement definition count</param>
/// <returns>
/// Number of achievement definitions or 0 if there is an error
/// </returns>
public uint GetAchievementDefinitionCount(GetAchievementDefinitionCountOptions options)
{
var optionsAddress = System.IntPtr.Zero;
Helper.TryMarshalSet<GetAchievementDefinitionCountOptionsInternal, GetAchievementDefinitionCountOptions>(ref optionsAddress, options);
var funcResult = Bindings.EOS_Achievements_GetAchievementDefinitionCount(InnerHandle, optionsAddress);
Helper.TryMarshalDispose(ref optionsAddress);
return funcResult;
}
/// <summary>
/// Fetch the number of player achievements that are cached locally.
/// <seealso cref="CopyPlayerAchievementByIndex" />
/// </summary>
/// <param name="options">The Options associated with retrieving the player achievement count</param>
/// <returns>
/// Number of player achievements or 0 if there is an error
/// </returns>
public uint GetPlayerAchievementCount(GetPlayerAchievementCountOptions options)
{
var optionsAddress = System.IntPtr.Zero;
Helper.TryMarshalSet<GetPlayerAchievementCountOptionsInternal, GetPlayerAchievementCountOptions>(ref optionsAddress, options);
var funcResult = Bindings.EOS_Achievements_GetPlayerAchievementCount(InnerHandle, optionsAddress);
Helper.TryMarshalDispose(ref optionsAddress);
return funcResult;
}
/// <summary>
/// DEPRECATED! Use <see cref="GetPlayerAchievementCount" />, <see cref="CopyPlayerAchievementByIndex" /> and filter for unlocked instead.
///
/// Fetch the number of unlocked achievements that are cached locally.
/// <seealso cref="CopyUnlockedAchievementByIndex" />
/// </summary>
/// <param name="options">The Options associated with retrieving the unlocked achievement count</param>
/// <returns>
/// Number of unlocked achievements or 0 if there is an error
/// </returns>
public uint GetUnlockedAchievementCount(GetUnlockedAchievementCountOptions options)
{
var optionsAddress = System.IntPtr.Zero;
Helper.TryMarshalSet<GetUnlockedAchievementCountOptionsInternal, GetUnlockedAchievementCountOptions>(ref optionsAddress, options);
var funcResult = Bindings.EOS_Achievements_GetUnlockedAchievementCount(InnerHandle, optionsAddress);
Helper.TryMarshalDispose(ref optionsAddress);
return funcResult;
}
/// <summary>
/// Query for a list of definitions for all existing achievements, including localized text, icon IDs and whether an achievement is hidden.
///
/// @note When the Social Overlay is enabled then this will be called automatically. The Social Overlay is enabled by default (see <see cref="Platform.PlatformFlags.DisableSocialOverlay" />).
/// </summary>
/// <param name="options">Structure containing information about the application whose achievement definitions we're retrieving.</param>
/// <param name="clientData">Arbitrary data that is passed back to you in the CompletionDelegate</param>
/// <param name="completionDelegate">This function is called when the query definitions operation completes.</param>
/// <returns>
/// <see cref="Result.Success" /> if the operation completes successfully
/// <see cref="Result.InvalidParameters" /> if any of the options are incorrect
/// </returns>
public void QueryDefinitions(QueryDefinitionsOptions options, object clientData, OnQueryDefinitionsCompleteCallback completionDelegate)
{
var optionsAddress = System.IntPtr.Zero;
Helper.TryMarshalSet<QueryDefinitionsOptionsInternal, QueryDefinitionsOptions>(ref optionsAddress, options);
var clientDataAddress = System.IntPtr.Zero;
var completionDelegateInternal = new OnQueryDefinitionsCompleteCallbackInternal(OnQueryDefinitionsCompleteCallbackInternalImplementation);
Helper.AddCallback(ref clientDataAddress, clientData, completionDelegate, completionDelegateInternal);
Bindings.EOS_Achievements_QueryDefinitions(InnerHandle, optionsAddress, clientDataAddress, completionDelegateInternal);
Helper.TryMarshalDispose(ref optionsAddress);
}
/// <summary>
/// Query for a list of achievements for a specific player, including progress towards completion for each achievement.
///
/// @note When the Social Overlay is enabled then this will be called automatically. The Social Overlay is enabled by default (see <see cref="Platform.PlatformFlags.DisableSocialOverlay" />).
/// </summary>
/// <param name="options">Structure containing information about the player whose achievements we're retrieving.</param>
/// <param name="clientData">Arbitrary data that is passed back to you in the CompletionDelegate</param>
/// <param name="completionDelegate">This function is called when the query player achievements operation completes.</param>
/// <returns>
/// <see cref="Result.Success" /> if the operation completes successfully
/// <see cref="Result.InvalidProductUserID" /> if any of the userid options are incorrect
/// <see cref="Result.InvalidParameters" /> if any of the other options are incorrect
/// </returns>
public void QueryPlayerAchievements(QueryPlayerAchievementsOptions options, object clientData, OnQueryPlayerAchievementsCompleteCallback completionDelegate)
{
var optionsAddress = System.IntPtr.Zero;
Helper.TryMarshalSet<QueryPlayerAchievementsOptionsInternal, QueryPlayerAchievementsOptions>(ref optionsAddress, options);
var clientDataAddress = System.IntPtr.Zero;
var completionDelegateInternal = new OnQueryPlayerAchievementsCompleteCallbackInternal(OnQueryPlayerAchievementsCompleteCallbackInternalImplementation);
Helper.AddCallback(ref clientDataAddress, clientData, completionDelegate, completionDelegateInternal);
Bindings.EOS_Achievements_QueryPlayerAchievements(InnerHandle, optionsAddress, clientDataAddress, completionDelegateInternal);
Helper.TryMarshalDispose(ref optionsAddress);
}
/// <summary>
/// Unregister from receiving achievement unlocked notifications.
/// <seealso cref="AddNotifyAchievementsUnlocked" />
/// </summary>
/// <param name="inId">Handle representing the registered callback</param>
public void RemoveNotifyAchievementsUnlocked(ulong inId)
{
Helper.TryRemoveCallbackByNotificationId(inId);
Bindings.EOS_Achievements_RemoveNotifyAchievementsUnlocked(InnerHandle, inId);
}
/// <summary>
/// Unlocks a number of achievements for a specific player.
/// </summary>
/// <param name="options">Structure containing information about the achievements and the player whose achievements we're unlocking.</param>
/// <param name="clientData">Arbitrary data that is passed back to you in the CompletionDelegate</param>
/// <param name="completionDelegate">This function is called when the unlock achievements operation completes.</param>
/// <returns>
/// <see cref="Result.Success" /> if the operation completes successfully
/// <see cref="Result.InvalidParameters" /> if any of the options are incorrect
/// </returns>
public void UnlockAchievements(UnlockAchievementsOptions options, object clientData, OnUnlockAchievementsCompleteCallback completionDelegate)
{
var optionsAddress = System.IntPtr.Zero;
Helper.TryMarshalSet<UnlockAchievementsOptionsInternal, UnlockAchievementsOptions>(ref optionsAddress, options);
var clientDataAddress = System.IntPtr.Zero;
var completionDelegateInternal = new OnUnlockAchievementsCompleteCallbackInternal(OnUnlockAchievementsCompleteCallbackInternalImplementation);
Helper.AddCallback(ref clientDataAddress, clientData, completionDelegate, completionDelegateInternal);
Bindings.EOS_Achievements_UnlockAchievements(InnerHandle, optionsAddress, clientDataAddress, completionDelegateInternal);
Helper.TryMarshalDispose(ref optionsAddress);
}
[MonoPInvokeCallback(typeof(OnAchievementsUnlockedCallbackInternal))]
internal static void OnAchievementsUnlockedCallbackInternalImplementation(System.IntPtr data)
{
OnAchievementsUnlockedCallback callback;
OnAchievementsUnlockedCallbackInfo callbackInfo;
if (Helper.TryGetAndRemoveCallback<OnAchievementsUnlockedCallback, OnAchievementsUnlockedCallbackInfoInternal, OnAchievementsUnlockedCallbackInfo>(data, out callback, out callbackInfo))
{
callback(callbackInfo);
}
}
[MonoPInvokeCallback(typeof(OnAchievementsUnlockedCallbackV2Internal))]
internal static void OnAchievementsUnlockedCallbackV2InternalImplementation(System.IntPtr data)
{
OnAchievementsUnlockedCallbackV2 callback;
OnAchievementsUnlockedCallbackV2Info callbackInfo;
if (Helper.TryGetAndRemoveCallback<OnAchievementsUnlockedCallbackV2, OnAchievementsUnlockedCallbackV2InfoInternal, OnAchievementsUnlockedCallbackV2Info>(data, out callback, out callbackInfo))
{
callback(callbackInfo);
}
}
[MonoPInvokeCallback(typeof(OnQueryDefinitionsCompleteCallbackInternal))]
internal static void OnQueryDefinitionsCompleteCallbackInternalImplementation(System.IntPtr data)
{
OnQueryDefinitionsCompleteCallback callback;
OnQueryDefinitionsCompleteCallbackInfo callbackInfo;
if (Helper.TryGetAndRemoveCallback<OnQueryDefinitionsCompleteCallback, OnQueryDefinitionsCompleteCallbackInfoInternal, OnQueryDefinitionsCompleteCallbackInfo>(data, out callback, out callbackInfo))
{
callback(callbackInfo);
}
}
[MonoPInvokeCallback(typeof(OnQueryPlayerAchievementsCompleteCallbackInternal))]
internal static void OnQueryPlayerAchievementsCompleteCallbackInternalImplementation(System.IntPtr data)
{
OnQueryPlayerAchievementsCompleteCallback callback;
OnQueryPlayerAchievementsCompleteCallbackInfo callbackInfo;
if (Helper.TryGetAndRemoveCallback<OnQueryPlayerAchievementsCompleteCallback, OnQueryPlayerAchievementsCompleteCallbackInfoInternal, OnQueryPlayerAchievementsCompleteCallbackInfo>(data, out callback, out callbackInfo))
{
callback(callbackInfo);
}
}
[MonoPInvokeCallback(typeof(OnUnlockAchievementsCompleteCallbackInternal))]
internal static void OnUnlockAchievementsCompleteCallbackInternalImplementation(System.IntPtr data)
{
OnUnlockAchievementsCompleteCallback callback;
OnUnlockAchievementsCompleteCallbackInfo callbackInfo;
if (Helper.TryGetAndRemoveCallback<OnUnlockAchievementsCompleteCallback, OnUnlockAchievementsCompleteCallbackInfoInternal, OnUnlockAchievementsCompleteCallbackInfo>(data, out callback, out callbackInfo))
{
callback(callbackInfo);
}
}
}
}

View file

@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 91b363f40f7831b46af876f05404ed1f
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -1,35 +0,0 @@
// Copyright Epic Games, Inc. All Rights Reserved.
// This file is automatically generated. Changes to this file may be overwritten.
namespace Epic.OnlineServices.Achievements
{
/// <summary>
/// Input parameters for the <see cref="AchievementsInterface.AddNotifyAchievementsUnlocked" /> function.
/// </summary>
public class AddNotifyAchievementsUnlockedOptions
{
}
[System.Runtime.InteropServices.StructLayout(System.Runtime.InteropServices.LayoutKind.Sequential, Pack = 8)]
internal struct AddNotifyAchievementsUnlockedOptionsInternal : ISettable, System.IDisposable
{
private int m_ApiVersion;
public void Set(AddNotifyAchievementsUnlockedOptions other)
{
if (other != null)
{
m_ApiVersion = AchievementsInterface.AddnotifyachievementsunlockedApiLatest;
}
}
public void Set(object other)
{
Set(other as AddNotifyAchievementsUnlockedOptions);
}
public void Dispose()
{
}
}
}

View file

@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 27ac1b5bf7e7b7e44b0fd97384e00471
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -1,35 +0,0 @@
// Copyright Epic Games, Inc. All Rights Reserved.
// This file is automatically generated. Changes to this file may be overwritten.
namespace Epic.OnlineServices.Achievements
{
/// <summary>
/// Input parameters for the <see cref="AchievementsInterface.AddNotifyAchievementsUnlocked" /> function.
/// </summary>
public class AddNotifyAchievementsUnlockedV2Options
{
}
[System.Runtime.InteropServices.StructLayout(System.Runtime.InteropServices.LayoutKind.Sequential, Pack = 8)]
internal struct AddNotifyAchievementsUnlockedV2OptionsInternal : ISettable, System.IDisposable
{
private int m_ApiVersion;
public void Set(AddNotifyAchievementsUnlockedV2Options other)
{
if (other != null)
{
m_ApiVersion = AchievementsInterface.Addnotifyachievementsunlockedv2ApiLatest;
}
}
public void Set(object other)
{
Set(other as AddNotifyAchievementsUnlockedV2Options);
}
public void Dispose()
{
}
}
}

View file

@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 210bbcd9a74f8db43ada84fcd51d8aca
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -1,50 +0,0 @@
// Copyright Epic Games, Inc. All Rights Reserved.
// This file is automatically generated. Changes to this file may be overwritten.
namespace Epic.OnlineServices.Achievements
{
/// <summary>
/// Input parameters for the <see cref="AchievementsInterface.CopyAchievementDefinitionByAchievementId" /> function.
/// </summary>
public class CopyAchievementDefinitionByAchievementIdOptions
{
/// <summary>
/// Achievement ID to look for when copying definition from the cache
/// </summary>
public string AchievementId { get; set; }
}
[System.Runtime.InteropServices.StructLayout(System.Runtime.InteropServices.LayoutKind.Sequential, Pack = 8)]
internal struct CopyAchievementDefinitionByAchievementIdOptionsInternal : ISettable, System.IDisposable
{
private int m_ApiVersion;
private System.IntPtr m_AchievementId;
public string AchievementId
{
set
{
Helper.TryMarshalSet(ref m_AchievementId, value);
}
}
public void Set(CopyAchievementDefinitionByAchievementIdOptions other)
{
if (other != null)
{
m_ApiVersion = AchievementsInterface.CopydefinitionbyachievementidApiLatest;
AchievementId = other.AchievementId;
}
}
public void Set(object other)
{
Set(other as CopyAchievementDefinitionByAchievementIdOptions);
}
public void Dispose()
{
Helper.TryMarshalDispose(ref m_AchievementId);
}
}
}

View file

@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: fa7ef783960cb3a418583f7df08be2b6
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -1,49 +0,0 @@
// Copyright Epic Games, Inc. All Rights Reserved.
// This file is automatically generated. Changes to this file may be overwritten.
namespace Epic.OnlineServices.Achievements
{
/// <summary>
/// Input parameters for the <see cref="AchievementsInterface.CopyAchievementDefinitionByIndex" /> function.
/// </summary>
public class CopyAchievementDefinitionByIndexOptions
{
/// <summary>
/// Index of the achievement definition to retrieve from the cache
/// </summary>
public uint AchievementIndex { get; set; }
}
[System.Runtime.InteropServices.StructLayout(System.Runtime.InteropServices.LayoutKind.Sequential, Pack = 8)]
internal struct CopyAchievementDefinitionByIndexOptionsInternal : ISettable, System.IDisposable
{
private int m_ApiVersion;
private uint m_AchievementIndex;
public uint AchievementIndex
{
set
{
m_AchievementIndex = value;
}
}
public void Set(CopyAchievementDefinitionByIndexOptions other)
{
if (other != null)
{
m_ApiVersion = AchievementsInterface.CopydefinitionbyindexApiLatest;
AchievementIndex = other.AchievementIndex;
}
}
public void Set(object other)
{
Set(other as CopyAchievementDefinitionByIndexOptions);
}
public void Dispose()
{
}
}
}

View file

@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: f76bab9e397b93a4e9c35ce563039a44
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -1,50 +0,0 @@
// Copyright Epic Games, Inc. All Rights Reserved.
// This file is automatically generated. Changes to this file may be overwritten.
namespace Epic.OnlineServices.Achievements
{
/// <summary>
/// Input parameters for the <see cref="AchievementsInterface.CopyAchievementDefinitionV2ByAchievementId" /> function.
/// </summary>
public class CopyAchievementDefinitionV2ByAchievementIdOptions
{
/// <summary>
/// Achievement ID to look for when copying the definition from the cache.
/// </summary>
public string AchievementId { get; set; }
}
[System.Runtime.InteropServices.StructLayout(System.Runtime.InteropServices.LayoutKind.Sequential, Pack = 8)]
internal struct CopyAchievementDefinitionV2ByAchievementIdOptionsInternal : ISettable, System.IDisposable
{
private int m_ApiVersion;
private System.IntPtr m_AchievementId;
public string AchievementId
{
set
{
Helper.TryMarshalSet(ref m_AchievementId, value);
}
}
public void Set(CopyAchievementDefinitionV2ByAchievementIdOptions other)
{
if (other != null)
{
m_ApiVersion = AchievementsInterface.Copyachievementdefinitionv2ByachievementidApiLatest;
AchievementId = other.AchievementId;
}
}
public void Set(object other)
{
Set(other as CopyAchievementDefinitionV2ByAchievementIdOptions);
}
public void Dispose()
{
Helper.TryMarshalDispose(ref m_AchievementId);
}
}
}

View file

@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: d0be84c5a29f5a34ca63f0968ddce2fc
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -1,49 +0,0 @@
// Copyright Epic Games, Inc. All Rights Reserved.
// This file is automatically generated. Changes to this file may be overwritten.
namespace Epic.OnlineServices.Achievements
{
/// <summary>
/// Input parameters for the <see cref="AchievementsInterface.CopyAchievementDefinitionByIndex" /> function.
/// </summary>
public class CopyAchievementDefinitionV2ByIndexOptions
{
/// <summary>
/// Index of the achievement definition to retrieve from the cache.
/// </summary>
public uint AchievementIndex { get; set; }
}
[System.Runtime.InteropServices.StructLayout(System.Runtime.InteropServices.LayoutKind.Sequential, Pack = 8)]
internal struct CopyAchievementDefinitionV2ByIndexOptionsInternal : ISettable, System.IDisposable
{
private int m_ApiVersion;
private uint m_AchievementIndex;
public uint AchievementIndex
{
set
{
m_AchievementIndex = value;
}
}
public void Set(CopyAchievementDefinitionV2ByIndexOptions other)
{
if (other != null)
{
m_ApiVersion = AchievementsInterface.Copyachievementdefinitionv2ByindexApiLatest;
AchievementIndex = other.AchievementIndex;
}
}
public void Set(object other)
{
Set(other as CopyAchievementDefinitionV2ByIndexOptions);
}
public void Dispose()
{
}
}
}

View file

@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 134fa143d5bcb7a4ca2569833d5f857f
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -1,82 +0,0 @@
// Copyright Epic Games, Inc. All Rights Reserved.
// This file is automatically generated. Changes to this file may be overwritten.
namespace Epic.OnlineServices.Achievements
{
/// <summary>
/// Input parameters for the <see cref="AchievementsInterface.CopyPlayerAchievementByAchievementId" /> function.
/// </summary>
public class CopyPlayerAchievementByAchievementIdOptions
{
/// <summary>
/// The Product User ID for the user whose achievement is to be retrieved.
/// </summary>
public ProductUserId TargetUserId { get; set; }
/// <summary>
/// Achievement ID to search for when retrieving player achievement data from the cache.
/// </summary>
public string AchievementId { get; set; }
/// <summary>
/// The Product User ID for the user who is querying for a player achievement. For a Dedicated Server this should be null.
/// </summary>
public ProductUserId LocalUserId { get; set; }
}
[System.Runtime.InteropServices.StructLayout(System.Runtime.InteropServices.LayoutKind.Sequential, Pack = 8)]
internal struct CopyPlayerAchievementByAchievementIdOptionsInternal : ISettable, System.IDisposable
{
private int m_ApiVersion;
private System.IntPtr m_TargetUserId;
private System.IntPtr m_AchievementId;
private System.IntPtr m_LocalUserId;
public ProductUserId TargetUserId
{
set
{
Helper.TryMarshalSet(ref m_TargetUserId, value);
}
}
public string AchievementId
{
set
{
Helper.TryMarshalSet(ref m_AchievementId, value);
}
}
public ProductUserId LocalUserId
{
set
{
Helper.TryMarshalSet(ref m_LocalUserId, value);
}
}
public void Set(CopyPlayerAchievementByAchievementIdOptions other)
{
if (other != null)
{
m_ApiVersion = AchievementsInterface.CopyplayerachievementbyachievementidApiLatest;
TargetUserId = other.TargetUserId;
AchievementId = other.AchievementId;
LocalUserId = other.LocalUserId;
}
}
public void Set(object other)
{
Set(other as CopyPlayerAchievementByAchievementIdOptions);
}
public void Dispose()
{
Helper.TryMarshalDispose(ref m_TargetUserId);
Helper.TryMarshalDispose(ref m_AchievementId);
Helper.TryMarshalDispose(ref m_LocalUserId);
}
}
}

View file

@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 085d9d8848929194f8a2cac75a8b1023
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -1,81 +0,0 @@
// Copyright Epic Games, Inc. All Rights Reserved.
// This file is automatically generated. Changes to this file may be overwritten.
namespace Epic.OnlineServices.Achievements
{
/// <summary>
/// Input parameters for the <see cref="AchievementsInterface.CopyPlayerAchievementByIndex" /> function.
/// </summary>
public class CopyPlayerAchievementByIndexOptions
{
/// <summary>
/// The Product User ID for the user whose achievement is to be retrieved.
/// </summary>
public ProductUserId TargetUserId { get; set; }
/// <summary>
/// The index of the player achievement data to retrieve from the cache.
/// </summary>
public uint AchievementIndex { get; set; }
/// <summary>
/// The Product User ID for the user who is querying for a player achievement. For a Dedicated Server this should be null.
/// </summary>
public ProductUserId LocalUserId { get; set; }
}
[System.Runtime.InteropServices.StructLayout(System.Runtime.InteropServices.LayoutKind.Sequential, Pack = 8)]
internal struct CopyPlayerAchievementByIndexOptionsInternal : ISettable, System.IDisposable
{
private int m_ApiVersion;
private System.IntPtr m_TargetUserId;
private uint m_AchievementIndex;
private System.IntPtr m_LocalUserId;
public ProductUserId TargetUserId
{
set
{
Helper.TryMarshalSet(ref m_TargetUserId, value);
}
}
public uint AchievementIndex
{
set
{
m_AchievementIndex = value;
}
}
public ProductUserId LocalUserId
{
set
{
Helper.TryMarshalSet(ref m_LocalUserId, value);
}
}
public void Set(CopyPlayerAchievementByIndexOptions other)
{
if (other != null)
{
m_ApiVersion = AchievementsInterface.CopyplayerachievementbyindexApiLatest;
TargetUserId = other.TargetUserId;
AchievementIndex = other.AchievementIndex;
LocalUserId = other.LocalUserId;
}
}
public void Set(object other)
{
Set(other as CopyPlayerAchievementByIndexOptions);
}
public void Dispose()
{
Helper.TryMarshalDispose(ref m_TargetUserId);
Helper.TryMarshalDispose(ref m_LocalUserId);
}
}
}

View file

@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 1a5d7cc06198b2d4ab4de19028eb4737
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -1,66 +0,0 @@
// Copyright Epic Games, Inc. All Rights Reserved.
// This file is automatically generated. Changes to this file may be overwritten.
namespace Epic.OnlineServices.Achievements
{
/// <summary>
/// Input parameters for the <see cref="AchievementsInterface.CopyUnlockedAchievementByAchievementId" /> function.
/// </summary>
public class CopyUnlockedAchievementByAchievementIdOptions
{
/// <summary>
/// The Product User ID for the user who is copying the unlocked achievement
/// </summary>
public ProductUserId UserId { get; set; }
/// <summary>
/// AchievementId of the unlocked achievement to retrieve from the cache
/// </summary>
public string AchievementId { get; set; }
}
[System.Runtime.InteropServices.StructLayout(System.Runtime.InteropServices.LayoutKind.Sequential, Pack = 8)]
internal struct CopyUnlockedAchievementByAchievementIdOptionsInternal : ISettable, System.IDisposable
{
private int m_ApiVersion;
private System.IntPtr m_UserId;
private System.IntPtr m_AchievementId;
public ProductUserId UserId
{
set
{
Helper.TryMarshalSet(ref m_UserId, value);
}
}
public string AchievementId
{
set
{
Helper.TryMarshalSet(ref m_AchievementId, value);
}
}
public void Set(CopyUnlockedAchievementByAchievementIdOptions other)
{
if (other != null)
{
m_ApiVersion = AchievementsInterface.CopyunlockedachievementbyachievementidApiLatest;
UserId = other.UserId;
AchievementId = other.AchievementId;
}
}
public void Set(object other)
{
Set(other as CopyUnlockedAchievementByAchievementIdOptions);
}
public void Dispose()
{
Helper.TryMarshalDispose(ref m_UserId);
Helper.TryMarshalDispose(ref m_AchievementId);
}
}
}

View file

@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 1ec39b7c4f2d86f4da0e53b50aa735c6
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -1,65 +0,0 @@
// Copyright Epic Games, Inc. All Rights Reserved.
// This file is automatically generated. Changes to this file may be overwritten.
namespace Epic.OnlineServices.Achievements
{
/// <summary>
/// Input parameters for the <see cref="AchievementsInterface.CopyUnlockedAchievementByIndex" /> function.
/// </summary>
public class CopyUnlockedAchievementByIndexOptions
{
/// <summary>
/// The Product User ID for the user who is copying the unlocked achievement
/// </summary>
public ProductUserId UserId { get; set; }
/// <summary>
/// Index of the unlocked achievement to retrieve from the cache
/// </summary>
public uint AchievementIndex { get; set; }
}
[System.Runtime.InteropServices.StructLayout(System.Runtime.InteropServices.LayoutKind.Sequential, Pack = 8)]
internal struct CopyUnlockedAchievementByIndexOptionsInternal : ISettable, System.IDisposable
{
private int m_ApiVersion;
private System.IntPtr m_UserId;
private uint m_AchievementIndex;
public ProductUserId UserId
{
set
{
Helper.TryMarshalSet(ref m_UserId, value);
}
}
public uint AchievementIndex
{
set
{
m_AchievementIndex = value;
}
}
public void Set(CopyUnlockedAchievementByIndexOptions other)
{
if (other != null)
{
m_ApiVersion = AchievementsInterface.CopyunlockedachievementbyindexApiLatest;
UserId = other.UserId;
AchievementIndex = other.AchievementIndex;
}
}
public void Set(object other)
{
Set(other as CopyUnlockedAchievementByIndexOptions);
}
public void Dispose()
{
Helper.TryMarshalDispose(ref m_UserId);
}
}
}

View file

@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 45a46c9737464a847bf1ba5425fff47f
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -1,310 +0,0 @@
// Copyright Epic Games, Inc. All Rights Reserved.
// This file is automatically generated. Changes to this file may be overwritten.
namespace Epic.OnlineServices.Achievements
{
/// <summary>
/// Contains information about a single achievement definition with localized text.
/// </summary>
public class Definition : ISettable
{
/// <summary>
/// Achievement ID that can be used to uniquely identify the achievement.
/// </summary>
public string AchievementId { get; set; }
/// <summary>
/// Text representing the Name to display in-game when achievement has been unlocked.
/// </summary>
public string DisplayName { get; set; }
/// <summary>
/// Text representing the description to display in-game when achievement has been unlocked.
/// </summary>
public string Description { get; set; }
/// <summary>
/// Text representing the name to display in-game when achievement is locked.
/// </summary>
public string LockedDisplayName { get; set; }
/// <summary>
/// Text representing the description of what needs to be done to trigger the unlock of this achievement.
/// </summary>
public string LockedDescription { get; set; }
/// <summary>
/// Text representing the description to display in-game when achievement is hidden.
/// </summary>
public string HiddenDescription { get; set; }
/// <summary>
/// Text representing the description of what happens when the achievement is unlocked.
/// </summary>
public string CompletionDescription { get; set; }
/// <summary>
/// Text representing the icon to display in-game when achievement is unlocked.
/// </summary>
public string UnlockedIconId { get; set; }
/// <summary>
/// Text representing the icon to display in-game when achievement is locked.
/// </summary>
public string LockedIconId { get; set; }
/// <summary>
/// True if achievement is hidden, false otherwise.
/// </summary>
public bool IsHidden { get; set; }
/// <summary>
/// Array of stat thresholds that need to be satisfied to unlock the achievement.
/// </summary>
public StatThresholds[] StatThresholds { get; set; }
internal void Set(DefinitionInternal? other)
{
if (other != null)
{
AchievementId = other.Value.AchievementId;
DisplayName = other.Value.DisplayName;
Description = other.Value.Description;
LockedDisplayName = other.Value.LockedDisplayName;
LockedDescription = other.Value.LockedDescription;
HiddenDescription = other.Value.HiddenDescription;
CompletionDescription = other.Value.CompletionDescription;
UnlockedIconId = other.Value.UnlockedIconId;
LockedIconId = other.Value.LockedIconId;
IsHidden = other.Value.IsHidden;
StatThresholds = other.Value.StatThresholds;
}
}
public void Set(object other)
{
Set(other as DefinitionInternal?);
}
}
[System.Runtime.InteropServices.StructLayout(System.Runtime.InteropServices.LayoutKind.Sequential, Pack = 8)]
internal struct DefinitionInternal : ISettable, System.IDisposable
{
private int m_ApiVersion;
private System.IntPtr m_AchievementId;
private System.IntPtr m_DisplayName;
private System.IntPtr m_Description;
private System.IntPtr m_LockedDisplayName;
private System.IntPtr m_LockedDescription;
private System.IntPtr m_HiddenDescription;
private System.IntPtr m_CompletionDescription;
private System.IntPtr m_UnlockedIconId;
private System.IntPtr m_LockedIconId;
private int m_IsHidden;
private int m_StatThresholdsCount;
private System.IntPtr m_StatThresholds;
public string AchievementId
{
get
{
string value;
Helper.TryMarshalGet(m_AchievementId, out value);
return value;
}
set
{
Helper.TryMarshalSet(ref m_AchievementId, value);
}
}
public string DisplayName
{
get
{
string value;
Helper.TryMarshalGet(m_DisplayName, out value);
return value;
}
set
{
Helper.TryMarshalSet(ref m_DisplayName, value);
}
}
public string Description
{
get
{
string value;
Helper.TryMarshalGet(m_Description, out value);
return value;
}
set
{
Helper.TryMarshalSet(ref m_Description, value);
}
}
public string LockedDisplayName
{
get
{
string value;
Helper.TryMarshalGet(m_LockedDisplayName, out value);
return value;
}
set
{
Helper.TryMarshalSet(ref m_LockedDisplayName, value);
}
}
public string LockedDescription
{
get
{
string value;
Helper.TryMarshalGet(m_LockedDescription, out value);
return value;
}
set
{
Helper.TryMarshalSet(ref m_LockedDescription, value);
}
}
public string HiddenDescription
{
get
{
string value;
Helper.TryMarshalGet(m_HiddenDescription, out value);
return value;
}
set
{
Helper.TryMarshalSet(ref m_HiddenDescription, value);
}
}
public string CompletionDescription
{
get
{
string value;
Helper.TryMarshalGet(m_CompletionDescription, out value);
return value;
}
set
{
Helper.TryMarshalSet(ref m_CompletionDescription, value);
}
}
public string UnlockedIconId
{
get
{
string value;
Helper.TryMarshalGet(m_UnlockedIconId, out value);
return value;
}
set
{
Helper.TryMarshalSet(ref m_UnlockedIconId, value);
}
}
public string LockedIconId
{
get
{
string value;
Helper.TryMarshalGet(m_LockedIconId, out value);
return value;
}
set
{
Helper.TryMarshalSet(ref m_LockedIconId, value);
}
}
public bool IsHidden
{
get
{
bool value;
Helper.TryMarshalGet(m_IsHidden, out value);
return value;
}
set
{
Helper.TryMarshalSet(ref m_IsHidden, value);
}
}
public StatThresholds[] StatThresholds
{
get
{
StatThresholds[] value;
Helper.TryMarshalGet<StatThresholdsInternal, StatThresholds>(m_StatThresholds, out value, m_StatThresholdsCount);
return value;
}
set
{
Helper.TryMarshalSet<StatThresholdsInternal, StatThresholds>(ref m_StatThresholds, value, out m_StatThresholdsCount);
}
}
public void Set(Definition other)
{
if (other != null)
{
m_ApiVersion = AchievementsInterface.DefinitionApiLatest;
AchievementId = other.AchievementId;
DisplayName = other.DisplayName;
Description = other.Description;
LockedDisplayName = other.LockedDisplayName;
LockedDescription = other.LockedDescription;
HiddenDescription = other.HiddenDescription;
CompletionDescription = other.CompletionDescription;
UnlockedIconId = other.UnlockedIconId;
LockedIconId = other.LockedIconId;
IsHidden = other.IsHidden;
StatThresholds = other.StatThresholds;
}
}
public void Set(object other)
{
Set(other as Definition);
}
public void Dispose()
{
Helper.TryMarshalDispose(ref m_AchievementId);
Helper.TryMarshalDispose(ref m_DisplayName);
Helper.TryMarshalDispose(ref m_Description);
Helper.TryMarshalDispose(ref m_LockedDisplayName);
Helper.TryMarshalDispose(ref m_LockedDescription);
Helper.TryMarshalDispose(ref m_HiddenDescription);
Helper.TryMarshalDispose(ref m_CompletionDescription);
Helper.TryMarshalDispose(ref m_UnlockedIconId);
Helper.TryMarshalDispose(ref m_LockedIconId);
Helper.TryMarshalDispose(ref m_StatThresholds);
}
}
}

View file

@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 759a26d7372f9fd46b31ef6c4f1482c0
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -1,286 +0,0 @@
// Copyright Epic Games, Inc. All Rights Reserved.
// This file is automatically generated. Changes to this file may be overwritten.
namespace Epic.OnlineServices.Achievements
{
/// <summary>
/// Contains information about a single achievement definition with localized text.
/// </summary>
public class DefinitionV2 : ISettable
{
/// <summary>
/// Achievement ID that can be used to uniquely identify the achievement.
/// </summary>
public string AchievementId { get; set; }
/// <summary>
/// Localized display name for the achievement when it has been unlocked.
/// </summary>
public string UnlockedDisplayName { get; set; }
/// <summary>
/// Localized description for the achievement when it has been unlocked.
/// </summary>
public string UnlockedDescription { get; set; }
/// <summary>
/// Localized display name for the achievement when it is locked or hidden.
/// </summary>
public string LockedDisplayName { get; set; }
/// <summary>
/// Localized description for the achievement when it is locked or hidden.
/// </summary>
public string LockedDescription { get; set; }
/// <summary>
/// Localized flavor text that can be used by the game in an arbitrary manner. This may be null if there is no data configured in the dev portal.
/// </summary>
public string FlavorText { get; set; }
/// <summary>
/// URL of an icon to display for the achievement when it is unlocked. This may be null if there is no data configured in the dev portal.
/// </summary>
public string UnlockedIconURL { get; set; }
/// <summary>
/// URL of an icon to display for the achievement when it is locked or hidden. This may be null if there is no data configured in the dev portal.
/// </summary>
public string LockedIconURL { get; set; }
/// <summary>
/// true if the achievement is hidden; false otherwise.
/// </summary>
public bool IsHidden { get; set; }
/// <summary>
/// Array of `<see cref="StatThresholds" />` that need to be satisfied to unlock this achievement. Consists of Name and Threshold Value.
/// </summary>
public StatThresholds[] StatThresholds { get; set; }
internal void Set(DefinitionV2Internal? other)
{
if (other != null)
{
AchievementId = other.Value.AchievementId;
UnlockedDisplayName = other.Value.UnlockedDisplayName;
UnlockedDescription = other.Value.UnlockedDescription;
LockedDisplayName = other.Value.LockedDisplayName;
LockedDescription = other.Value.LockedDescription;
FlavorText = other.Value.FlavorText;
UnlockedIconURL = other.Value.UnlockedIconURL;
LockedIconURL = other.Value.LockedIconURL;
IsHidden = other.Value.IsHidden;
StatThresholds = other.Value.StatThresholds;
}
}
public void Set(object other)
{
Set(other as DefinitionV2Internal?);
}
}
[System.Runtime.InteropServices.StructLayout(System.Runtime.InteropServices.LayoutKind.Sequential, Pack = 8)]
internal struct DefinitionV2Internal : ISettable, System.IDisposable
{
private int m_ApiVersion;
private System.IntPtr m_AchievementId;
private System.IntPtr m_UnlockedDisplayName;
private System.IntPtr m_UnlockedDescription;
private System.IntPtr m_LockedDisplayName;
private System.IntPtr m_LockedDescription;
private System.IntPtr m_FlavorText;
private System.IntPtr m_UnlockedIconURL;
private System.IntPtr m_LockedIconURL;
private int m_IsHidden;
private uint m_StatThresholdsCount;
private System.IntPtr m_StatThresholds;
public string AchievementId
{
get
{
string value;
Helper.TryMarshalGet(m_AchievementId, out value);
return value;
}
set
{
Helper.TryMarshalSet(ref m_AchievementId, value);
}
}
public string UnlockedDisplayName
{
get
{
string value;
Helper.TryMarshalGet(m_UnlockedDisplayName, out value);
return value;
}
set
{
Helper.TryMarshalSet(ref m_UnlockedDisplayName, value);
}
}
public string UnlockedDescription
{
get
{
string value;
Helper.TryMarshalGet(m_UnlockedDescription, out value);
return value;
}
set
{
Helper.TryMarshalSet(ref m_UnlockedDescription, value);
}
}
public string LockedDisplayName
{
get
{
string value;
Helper.TryMarshalGet(m_LockedDisplayName, out value);
return value;
}
set
{
Helper.TryMarshalSet(ref m_LockedDisplayName, value);
}
}
public string LockedDescription
{
get
{
string value;
Helper.TryMarshalGet(m_LockedDescription, out value);
return value;
}
set
{
Helper.TryMarshalSet(ref m_LockedDescription, value);
}
}
public string FlavorText
{
get
{
string value;
Helper.TryMarshalGet(m_FlavorText, out value);
return value;
}
set
{
Helper.TryMarshalSet(ref m_FlavorText, value);
}
}
public string UnlockedIconURL
{
get
{
string value;
Helper.TryMarshalGet(m_UnlockedIconURL, out value);
return value;
}
set
{
Helper.TryMarshalSet(ref m_UnlockedIconURL, value);
}
}
public string LockedIconURL
{
get
{
string value;
Helper.TryMarshalGet(m_LockedIconURL, out value);
return value;
}
set
{
Helper.TryMarshalSet(ref m_LockedIconURL, value);
}
}
public bool IsHidden
{
get
{
bool value;
Helper.TryMarshalGet(m_IsHidden, out value);
return value;
}
set
{
Helper.TryMarshalSet(ref m_IsHidden, value);
}
}
public StatThresholds[] StatThresholds
{
get
{
StatThresholds[] value;
Helper.TryMarshalGet<StatThresholdsInternal, StatThresholds>(m_StatThresholds, out value, m_StatThresholdsCount);
return value;
}
set
{
Helper.TryMarshalSet<StatThresholdsInternal, StatThresholds>(ref m_StatThresholds, value, out m_StatThresholdsCount);
}
}
public void Set(DefinitionV2 other)
{
if (other != null)
{
m_ApiVersion = AchievementsInterface.Definitionv2ApiLatest;
AchievementId = other.AchievementId;
UnlockedDisplayName = other.UnlockedDisplayName;
UnlockedDescription = other.UnlockedDescription;
LockedDisplayName = other.LockedDisplayName;
LockedDescription = other.LockedDescription;
FlavorText = other.FlavorText;
UnlockedIconURL = other.UnlockedIconURL;
LockedIconURL = other.LockedIconURL;
IsHidden = other.IsHidden;
StatThresholds = other.StatThresholds;
}
}
public void Set(object other)
{
Set(other as DefinitionV2);
}
public void Dispose()
{
Helper.TryMarshalDispose(ref m_AchievementId);
Helper.TryMarshalDispose(ref m_UnlockedDisplayName);
Helper.TryMarshalDispose(ref m_UnlockedDescription);
Helper.TryMarshalDispose(ref m_LockedDisplayName);
Helper.TryMarshalDispose(ref m_LockedDescription);
Helper.TryMarshalDispose(ref m_FlavorText);
Helper.TryMarshalDispose(ref m_UnlockedIconURL);
Helper.TryMarshalDispose(ref m_LockedIconURL);
Helper.TryMarshalDispose(ref m_StatThresholds);
}
}
}

View file

@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 9dbd42bf6b6d97b4eae1198f5594bccb
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -1,35 +0,0 @@
// Copyright Epic Games, Inc. All Rights Reserved.
// This file is automatically generated. Changes to this file may be overwritten.
namespace Epic.OnlineServices.Achievements
{
/// <summary>
/// Input parameters for the <see cref="AchievementsInterface.GetAchievementDefinitionCount" /> function.
/// </summary>
public class GetAchievementDefinitionCountOptions
{
}
[System.Runtime.InteropServices.StructLayout(System.Runtime.InteropServices.LayoutKind.Sequential, Pack = 8)]
internal struct GetAchievementDefinitionCountOptionsInternal : ISettable, System.IDisposable
{
private int m_ApiVersion;
public void Set(GetAchievementDefinitionCountOptions other)
{
if (other != null)
{
m_ApiVersion = AchievementsInterface.GetachievementdefinitioncountApiLatest;
}
}
public void Set(object other)
{
Set(other as GetAchievementDefinitionCountOptions);
}
public void Dispose()
{
}
}
}

View file

@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 55492a353089274418fd66eeb5d01af7
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -1,50 +0,0 @@
// Copyright Epic Games, Inc. All Rights Reserved.
// This file is automatically generated. Changes to this file may be overwritten.
namespace Epic.OnlineServices.Achievements
{
/// <summary>
/// Input parameters for the <see cref="AchievementsInterface.GetPlayerAchievementCount" /> function.
/// </summary>
public class GetPlayerAchievementCountOptions
{
/// <summary>
/// The Product User ID for the user whose achievement count is being retrieved.
/// </summary>
public ProductUserId UserId { get; set; }
}
[System.Runtime.InteropServices.StructLayout(System.Runtime.InteropServices.LayoutKind.Sequential, Pack = 8)]
internal struct GetPlayerAchievementCountOptionsInternal : ISettable, System.IDisposable
{
private int m_ApiVersion;
private System.IntPtr m_UserId;
public ProductUserId UserId
{
set
{
Helper.TryMarshalSet(ref m_UserId, value);
}
}
public void Set(GetPlayerAchievementCountOptions other)
{
if (other != null)
{
m_ApiVersion = AchievementsInterface.GetplayerachievementcountApiLatest;
UserId = other.UserId;
}
}
public void Set(object other)
{
Set(other as GetPlayerAchievementCountOptions);
}
public void Dispose()
{
Helper.TryMarshalDispose(ref m_UserId);
}
}
}

View file

@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 16211e28b6b235940bb4472dcab28016
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -1,50 +0,0 @@
// Copyright Epic Games, Inc. All Rights Reserved.
// This file is automatically generated. Changes to this file may be overwritten.
namespace Epic.OnlineServices.Achievements
{
/// <summary>
/// Input parameters for the <see cref="AchievementsInterface.GetUnlockedAchievementCount" /> function.
/// </summary>
public class GetUnlockedAchievementCountOptions
{
/// <summary>
/// Product User ID for which to retrieve the unlocked achievement count
/// </summary>
public ProductUserId UserId { get; set; }
}
[System.Runtime.InteropServices.StructLayout(System.Runtime.InteropServices.LayoutKind.Sequential, Pack = 8)]
internal struct GetUnlockedAchievementCountOptionsInternal : ISettable, System.IDisposable
{
private int m_ApiVersion;
private System.IntPtr m_UserId;
public ProductUserId UserId
{
set
{
Helper.TryMarshalSet(ref m_UserId, value);
}
}
public void Set(GetUnlockedAchievementCountOptions other)
{
if (other != null)
{
m_ApiVersion = AchievementsInterface.GetunlockedachievementcountApiLatest;
UserId = other.UserId;
}
}
public void Set(object other)
{
Set(other as GetUnlockedAchievementCountOptions);
}
public void Dispose()
{
Helper.TryMarshalDispose(ref m_UserId);
}
}
}

View file

@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 5c303f38afb7de84fa3f1014f68187cf
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -1,14 +0,0 @@
// Copyright Epic Games, Inc. All Rights Reserved.
// This file is automatically generated. Changes to this file may be overwritten.
namespace Epic.OnlineServices.Achievements
{
/// <summary>
/// Function prototype definition for notifications that come from <see cref="AchievementsInterface.AddNotifyAchievementsUnlocked" />
/// </summary>
/// <param name="data">A <see cref="OnAchievementsUnlockedCallbackInfo" /> containing the output information and result</param>
public delegate void OnAchievementsUnlockedCallback(OnAchievementsUnlockedCallbackInfo data);
[System.Runtime.InteropServices.UnmanagedFunctionPointer(Config.LibraryCallingConvention)]
internal delegate void OnAchievementsUnlockedCallbackInternal(System.IntPtr data);
}

View file

@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 55b3d527bbd8b914fa184c06814999a2
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -1,93 +0,0 @@
// Copyright Epic Games, Inc. All Rights Reserved.
// This file is automatically generated. Changes to this file may be overwritten.
namespace Epic.OnlineServices.Achievements
{
/// <summary>
/// Output parameters for the <see cref="OnAchievementsUnlockedCallback" /> Function.
/// </summary>
public class OnAchievementsUnlockedCallbackInfo : ICallbackInfo, ISettable
{
/// <summary>
/// Context that was passed into <see cref="AchievementsInterface.AddNotifyAchievementsUnlocked" />
/// </summary>
public object ClientData { get; private set; }
/// <summary>
/// The Product User ID for the user who received the unlocked achievements notification
/// </summary>
public ProductUserId UserId { get; private set; }
/// <summary>
/// This member is not used and will always be set to NULL.
/// </summary>
public string[] AchievementIds { get; private set; }
public Result? GetResultCode()
{
return null;
}
internal void Set(OnAchievementsUnlockedCallbackInfoInternal? other)
{
if (other != null)
{
ClientData = other.Value.ClientData;
UserId = other.Value.UserId;
AchievementIds = other.Value.AchievementIds;
}
}
public void Set(object other)
{
Set(other as OnAchievementsUnlockedCallbackInfoInternal?);
}
}
[System.Runtime.InteropServices.StructLayout(System.Runtime.InteropServices.LayoutKind.Sequential, Pack = 8)]
internal struct OnAchievementsUnlockedCallbackInfoInternal : ICallbackInfoInternal
{
private System.IntPtr m_ClientData;
private System.IntPtr m_UserId;
private uint m_AchievementsCount;
private System.IntPtr m_AchievementIds;
public object ClientData
{
get
{
object value;
Helper.TryMarshalGet(m_ClientData, out value);
return value;
}
}
public System.IntPtr ClientDataAddress
{
get
{
return m_ClientData;
}
}
public ProductUserId UserId
{
get
{
ProductUserId value;
Helper.TryMarshalGet(m_UserId, out value);
return value;
}
}
public string[] AchievementIds
{
get
{
string[] value;
Helper.TryMarshalGet(m_AchievementIds, out value, m_AchievementsCount, true);
return value;
}
}
}
}

View file

@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 916dfd77669274945bdb33e77611ff5c
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -1,14 +0,0 @@
// Copyright Epic Games, Inc. All Rights Reserved.
// This file is automatically generated. Changes to this file may be overwritten.
namespace Epic.OnlineServices.Achievements
{
/// <summary>
/// Function prototype definition for notifications that come from <see cref="AchievementsInterface.AddNotifyAchievementsUnlockedV2" />
/// </summary>
/// <param name="data">An <see cref="OnAchievementsUnlockedCallbackV2Info" /> containing the output information and result</param>
public delegate void OnAchievementsUnlockedCallbackV2(OnAchievementsUnlockedCallbackV2Info data);
[System.Runtime.InteropServices.UnmanagedFunctionPointer(Config.LibraryCallingConvention)]
internal delegate void OnAchievementsUnlockedCallbackV2Internal(System.IntPtr data);
}

View file

@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 4ed4cccbb7e07c4498060aed0891ba82
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -1,109 +0,0 @@
// Copyright Epic Games, Inc. All Rights Reserved.
// This file is automatically generated. Changes to this file may be overwritten.
namespace Epic.OnlineServices.Achievements
{
/// <summary>
/// Output parameters for the <see cref="OnAchievementsUnlockedCallbackV2" /> Function.
/// </summary>
public class OnAchievementsUnlockedCallbackV2Info : ICallbackInfo, ISettable
{
/// <summary>
/// Context that was passed into <see cref="AchievementsInterface.AddNotifyAchievementsUnlocked" />
/// </summary>
public object ClientData { get; private set; }
/// <summary>
/// The Product User ID for the user who received the unlocked achievements notification
/// </summary>
public ProductUserId UserId { get; private set; }
/// <summary>
/// The Achievement ID for the achievement that was unlocked. Pass this to <see cref="AchievementsInterface.CopyPlayerAchievementByAchievementId" /> to get the full achievement information.
/// </summary>
public string AchievementId { get; private set; }
/// <summary>
/// POSIX timestamp when the achievement was unlocked.
/// </summary>
public System.DateTimeOffset? UnlockTime { get; private set; }
public Result? GetResultCode()
{
return null;
}
internal void Set(OnAchievementsUnlockedCallbackV2InfoInternal? other)
{
if (other != null)
{
ClientData = other.Value.ClientData;
UserId = other.Value.UserId;
AchievementId = other.Value.AchievementId;
UnlockTime = other.Value.UnlockTime;
}
}
public void Set(object other)
{
Set(other as OnAchievementsUnlockedCallbackV2InfoInternal?);
}
}
[System.Runtime.InteropServices.StructLayout(System.Runtime.InteropServices.LayoutKind.Sequential, Pack = 8)]
internal struct OnAchievementsUnlockedCallbackV2InfoInternal : ICallbackInfoInternal
{
private System.IntPtr m_ClientData;
private System.IntPtr m_UserId;
private System.IntPtr m_AchievementId;
private long m_UnlockTime;
public object ClientData
{
get
{
object value;
Helper.TryMarshalGet(m_ClientData, out value);
return value;
}
}
public System.IntPtr ClientDataAddress
{
get
{
return m_ClientData;
}
}
public ProductUserId UserId
{
get
{
ProductUserId value;
Helper.TryMarshalGet(m_UserId, out value);
return value;
}
}
public string AchievementId
{
get
{
string value;
Helper.TryMarshalGet(m_AchievementId, out value);
return value;
}
}
public System.DateTimeOffset? UnlockTime
{
get
{
System.DateTimeOffset? value;
Helper.TryMarshalGet(m_UnlockTime, out value);
return value;
}
}
}
}

View file

@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 9bd373a4bafc9d64aa4d754b308a0a8f
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -1,14 +0,0 @@
// Copyright Epic Games, Inc. All Rights Reserved.
// This file is automatically generated. Changes to this file may be overwritten.
namespace Epic.OnlineServices.Achievements
{
/// <summary>
/// Function prototype definition for callbacks passed to <see cref="AchievementsInterface.QueryDefinitions" />
/// </summary>
/// <param name="data">An <see cref="OnQueryDefinitionsCompleteCallbackInfo" /> containing the output information and result</param>
public delegate void OnQueryDefinitionsCompleteCallback(OnQueryDefinitionsCompleteCallbackInfo data);
[System.Runtime.InteropServices.UnmanagedFunctionPointer(Config.LibraryCallingConvention)]
internal delegate void OnQueryDefinitionsCompleteCallbackInternal(System.IntPtr data);
}

View file

@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: d2649e4091bc73f46ae05020210500a8
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -1,73 +0,0 @@
// Copyright Epic Games, Inc. All Rights Reserved.
// This file is automatically generated. Changes to this file may be overwritten.
namespace Epic.OnlineServices.Achievements
{
/// <summary>
/// Data containing the result information for a query definitions request.
/// </summary>
public class OnQueryDefinitionsCompleteCallbackInfo : ICallbackInfo, ISettable
{
/// <summary>
/// The <see cref="Result" /> code for the operation. <see cref="Result.Success" /> indicates that the operation succeeded; other codes indicate errors.
/// </summary>
public Result ResultCode { get; private set; }
/// <summary>
/// User-defined context that was passed into <see cref="AchievementsInterface.QueryDefinitions" />.
/// </summary>
public object ClientData { get; private set; }
public Result? GetResultCode()
{
return ResultCode;
}
internal void Set(OnQueryDefinitionsCompleteCallbackInfoInternal? other)
{
if (other != null)
{
ResultCode = other.Value.ResultCode;
ClientData = other.Value.ClientData;
}
}
public void Set(object other)
{
Set(other as OnQueryDefinitionsCompleteCallbackInfoInternal?);
}
}
[System.Runtime.InteropServices.StructLayout(System.Runtime.InteropServices.LayoutKind.Sequential, Pack = 8)]
internal struct OnQueryDefinitionsCompleteCallbackInfoInternal : ICallbackInfoInternal
{
private Result m_ResultCode;
private System.IntPtr m_ClientData;
public Result ResultCode
{
get
{
return m_ResultCode;
}
}
public object ClientData
{
get
{
object value;
Helper.TryMarshalGet(m_ClientData, out value);
return value;
}
}
public System.IntPtr ClientDataAddress
{
get
{
return m_ClientData;
}
}
}
}

Some files were not shown because too many files have changed in this diff Show more