Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Assets/Scripts/EOSCustomInvitesManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ public void SetPayload(Utf8String InvitePayload)
}
else
{
Debug.LogFormat("CustomInvites (SetPayload): custom payload set to \"{0}\"", InvitePayload);
Debug.Log("CustomInvites (SetPayload): custom payload set");
}
}
else
Expand Down
21 changes: 11 additions & 10 deletions Assets/Scripts/EOSFriendsManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ namespace PlayEveryWare.EpicOnlineServices.Samples
using Epic.OnlineServices.UserInfo;
using System.Collections.Generic;
using Epic.OnlineServices.UI;
using Utility;

/// <summary>Class <c>FriendData</c> stores Friend data.</summary>
public class FriendData
Expand Down Expand Up @@ -202,7 +203,7 @@ private void OnSendInviteCompleted(ref SendInviteCallbackInfo data)
return;
}

Debug.LogFormat("Friends (SendInviteCallback): SendInvite Complete for user id: {0}", data.LocalUserId);
Debug.LogFormat("Friends (SendInviteCallback): SendInvite Complete for user id: {0}", data.LocalUserId.Redact());
AddFriendCallback?.Invoke(Result.Success);
}

Expand Down Expand Up @@ -242,7 +243,7 @@ private void OnAcceptInviteCompleted(ref AcceptInviteCallbackInfo data)
return;
}

Debug.LogFormat("Friends (OnAcceptInviteCompleted): Accept Invite Complete for user id: {0}", data.LocalUserId);
Debug.LogFormat("Friends (OnAcceptInviteCompleted): Accept Invite Complete for user id: {0}", data.LocalUserId.Redact());
AcceptInviteCallback?.Invoke(Result.Success);
}

Expand Down Expand Up @@ -282,7 +283,7 @@ private void OnRejectInviteCompleted(ref RejectInviteCallbackInfo data)
return;
}

Debug.LogFormat("Friends (OnRejectInviteCompleted): Reject Invite Complete for user id: {0}", data.LocalUserId);
Debug.LogFormat("Friends (OnRejectInviteCompleted): Reject Invite Complete for user id: {0}", data.LocalUserId.Redact());
RejectInviteCallback?.Invoke(Result.Success);
}

Expand Down Expand Up @@ -320,7 +321,7 @@ private void QueryFriendsCallback(ref QueryFriendsCallbackInfo data)
return;
}

Debug.LogFormat("Friends (QueryFriendsCallback): Query Friends Complete for user id: {0}", data.LocalUserId);
Debug.LogFormat("Friends (QueryFriendsCallback): Query Friends Complete for user id: {0}", data.LocalUserId.Redact());

GetFriendsCountOptions countOptions = new GetFriendsCountOptions()
{
Expand Down Expand Up @@ -354,7 +355,7 @@ private void QueryFriendsCallback(ref QueryFriendsCallbackInfo data)

FriendsStatus friendStatus = FriendsHandle.GetStatus(ref statusOptions);

Debug.LogFormat("Friends (QueryFriendsCallback): Friend Status {0} => {1}", friendUserId, friendStatus);
Debug.LogFormat("Friends (QueryFriendsCallback): Friend Status {0} => {1}", friendUserId.Redact(), friendStatus);

FriendData friendEntry = new FriendData()
{
Expand Down Expand Up @@ -456,15 +457,15 @@ private void OnQueryPresenceCompleted(ref QueryPresenceCallbackInfo data)
friendData.Presence = presenceInfo;
CachedFriendsDirty = true;

Debug.LogFormat("Friends (OnQueryPresenceCompleted): PresenceInfo (Status) updated for target user: {0}", data.TargetUserId);
Debug.LogFormat("Friends (OnQueryPresenceCompleted): PresenceInfo (Status) updated for target user: {0}", data.TargetUserId.Redact());
}
else
{
data.TargetUserId.ToString(out Utf8String targetUserIdString);

if(string.IsNullOrEmpty(targetUserIdString))

Debug.LogWarningFormat("Friends (OnQueryPresenceCompleted): PresenceInfo not stored, couldn't find target user in friends cache: {0}, ", data.TargetUserId);
Debug.LogWarningFormat("Friends (OnQueryPresenceCompleted): PresenceInfo not stored, couldn't find target user in friends cache: {0}, ", data.TargetUserId.Redact());
}
}

Expand Down Expand Up @@ -543,7 +544,7 @@ private void OnQueryExternalAccountMappingsCompleted(ref QueryExternalAccountMap
}
else
{
Debug.LogWarningFormat("Friends (OnQueryExternalAccountMappingsCompleted): No connected Epic Account associated with EpicAccountId = ({0})", epidAccountIdString);
Debug.LogWarningFormat("Friends (OnQueryExternalAccountMappingsCompleted): No connected Epic Account associated with EpicAccountId = ({0})", epidAccountIdString.Redact());
}
}
else
Expand All @@ -561,7 +562,7 @@ private void OnQueryExternalAccountMappingsCompleted(ref QueryExternalAccountMap
}
else
{
Debug.LogErrorFormat("Friends (OnQueryExternalAccountMappingsCompleted): Error updating ProductUserId for friend {0}", kvp.Key);
Debug.LogErrorFormat("Friends (OnQueryExternalAccountMappingsCompleted): Error updating ProductUserId for friend {0}", kvp.Key.Redact());
}
}
}
Expand Down Expand Up @@ -614,7 +615,7 @@ private void QueryUserInfoByDisplaynameCompleted(ref QueryUserInfoByDisplayNameC
return;
}

Debug.LogFormat("Friends (QueryUserInfoByDisplaynameCompleted): Query User Info Complete - UserId: {0}", data.TargetUserId);
Debug.LogFormat("Friends (QueryUserInfoByDisplaynameCompleted): Query User Info Complete - UserId: {0}", data.TargetUserId.Redact());

FriendData foundUser = new FriendData()
{
Expand Down
5 changes: 3 additions & 2 deletions Assets/Scripts/EOSHighFrequencyP2P.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ namespace PlayEveryWare.EpicOnlineServices.Samples
using UnityEngine;
using Epic.OnlineServices;
using Epic.OnlineServices.P2P;
using Utility;

public class EOSHighFrequencyPeer2PeerManager : IEOSSubManager
{
Expand Down Expand Up @@ -297,11 +298,11 @@ public ProductUserId HandleReceivedMessages()
else if (result == Result.Success)
{
//Log the message
Debug.LogFormat("Message received: peerId={0}, socketId={1}, data={2}", peerId, socketId, Encoding.UTF8.GetString(data));
Debug.LogFormat("Message received: peerId={0}, socketId={1}, data={2}", peerId.Redact(), socketId, Encoding.UTF8.GetString(data));

if (!peerId.IsValid())
{
Debug.LogError($"{nameof(EOSHighFrequencyPeer2PeerManager)} {nameof(HandleReceivedMessages)}: ProductUserId for '{peerId}' is not valid!");
Debug.LogError($"{nameof(EOSHighFrequencyPeer2PeerManager)} {nameof(HandleReceivedMessages)}: ProductUserId for '{peerId.Redact()}' is not valid!");
return null;
}
string message = System.Text.Encoding.UTF8.GetString(data);
Expand Down
14 changes: 7 additions & 7 deletions Assets/Scripts/EOSLobbyManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -934,9 +934,9 @@ private void OnRTCRoomParticipantAudioUpdateRecieved(ref ParticipantUpdatedCallb

/* Verbose Logging: Uncomment to print each time audio is received.
Debug.LogFormat("Lobbies (OnRTCRoomParticipantAudioUpdateRecieved): participant audio updated. LocalUserId={0}, Room={1}, ParticipantUserId={2}, IsTalking={3}, IsAudioDisabled={4}",
data.LocalUserId,
data.LocalUserId.Redact(),
data.RoomName,
data.ParticipantId,
data.ParticipantId.Redact(),
data.Speaking,
data.AudioStatus != RTCAudioStatus.Enabled);
*/
Expand Down Expand Up @@ -1729,7 +1729,7 @@ private void OnRTCRoomUpdateSendingCompleted(ref UpdateSendingCallbackInfo data)
// Ensure this update is for us
if(EOSManager.Instance.GetProductUserId() != data.LocalUserId)
{
Debug.LogErrorFormat("Lobbies (OnRTCRoomUpdateSendingCompleted): Incorrect LocalUserId! LocalProductId={0} != data.LocalUserId", LoggingUtils.Redact(EOSManager.Instance.GetProductUserId()), LoggingUtils.Redact(data.LocalUserId));
Debug.LogErrorFormat("Lobbies (OnRTCRoomUpdateSendingCompleted): Incorrect LocalUserId! LocalProductId={0} != data.LocalUserId ({1})", LoggingUtils.Redact(EOSManager.Instance.GetProductUserId()), LoggingUtils.Redact(data.LocalUserId));
return;
}

Expand Down Expand Up @@ -1777,7 +1777,7 @@ private void OnRTCRoomUpdateReceivingCompleted(ref UpdateReceivingCallbackInfo d
// Ensure this update is for our room
if (!CurrentLobby.RTCRoomName.Equals(data.RoomName, StringComparison.OrdinalIgnoreCase))
{
Debug.LogErrorFormat("Lobbies (OnRTCRoomUpdateReceivingCompleted): Incorrect Room! CurrentLobby.RTCRoomName={0} != data.RoomName", CurrentLobby.RTCRoomName, data.RoomName);
Debug.LogErrorFormat("Lobbies (OnRTCRoomUpdateReceivingCompleted): Incorrect Room! CurrentLobby.RTCRoomName={0} != data.RoomName ({1})", CurrentLobby.RTCRoomName, data.RoomName);
return;
}

Expand Down Expand Up @@ -1855,19 +1855,19 @@ private void OnRTCBlockParticipantCompleted(ref BlockParticipantCallbackInfo dat
return;
}

Debug.LogFormat("Lobbies (OnRTCBlockParticipantCompleted): Blocked Participant successfully. Participant={0}, Room={1}, Blocked={2}", data.ParticipantId, data.RoomName, data.Blocked);
Debug.LogFormat("Lobbies (OnRTCBlockParticipantCompleted): Blocked Participant successfully. Participant={0}, Room={1}, Blocked={2}", data.ParticipantId.Redact(), data.RoomName, data.Blocked);

// Ensure this update is for our room
if (!CurrentLobby.RTCRoomName.Equals(data.RoomName, StringComparison.OrdinalIgnoreCase))
{
Debug.LogErrorFormat("Lobbies (OnRTCBlockParticipantCompleted): Incorrect Room! CurrentLobby.RTCRoomName={0} != data.RoomName", CurrentLobby.RTCRoomName, data.RoomName);
Debug.LogErrorFormat("Lobbies (OnRTCBlockParticipantCompleted): Incorrect Room! CurrentLobby.RTCRoomName={0} != data.RoomName ({1})", CurrentLobby.RTCRoomName, data.RoomName);
return;
}

// Ensure this update is for us
if (EOSManager.Instance.GetProductUserId() != data.LocalUserId)
{
Debug.LogErrorFormat("Lobbies (OnRTCBlockParticipantCompleted): Incorrect LocalUserId! LocalProductId={0} != data.LocalUserId", LoggingUtils.Redact(EOSManager.Instance.GetProductUserId()), LoggingUtils.Redact(data.LocalUserId));
Debug.LogErrorFormat("Lobbies (OnRTCBlockParticipantCompleted): Incorrect LocalUserId! LocalProductId={0} != data.LocalUserId ({1})", LoggingUtils.Redact(EOSManager.Instance.GetProductUserId()), LoggingUtils.Redact(data.LocalUserId));
return;
}

Expand Down
8 changes: 4 additions & 4 deletions Assets/Scripts/EOSPeer2PeerManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ public void SendMessage(ProductUserId friendId, messageData message)
}
if (!connectionStates.TryGetValue(friendId, out var state) || state != PeerConnectionAppState.FullyConnected)
{
Debug.LogWarning($"SendMessage: Cannot send to {friendId}, not fully connected (State={state}).");
Debug.LogWarning($"SendMessage: Cannot send to {friendId.Redact()}, not fully connected (State={state}).");
return;
}

Expand Down Expand Up @@ -391,13 +391,13 @@ public ProductUserId HandleReceivedMessages()
{
SendHandshakeAck(peerId);
connectionStates[peerId] = PeerConnectionAppState.FullyConnected;
Debug.Log($"Received handshake request from {peerId}. Sending ack and setting FullyConnected.");
Debug.Log($"Received handshake request from {peerId.Redact()}. Sending ack and setting FullyConnected.");
return null;
}
else if (message == Acknowledgement)
{
connectionStates[peerId] = PeerConnectionAppState.FullyConnected;
Debug.Log($"Received handshake ack from {peerId}. Connection is now FullyConnected.");
Debug.Log($"Received handshake ack from {peerId.Redact()}. Connection is now FullyConnected.");
return null;
}
// --- End handshake ---
Expand Down Expand Up @@ -444,7 +444,7 @@ public ProductUserId HandleReceivedMessages()
}
else if (message == Ping)
{
Debug.Log($"EOS P2PNAT HandleReceivedMessages: received ping from {peerId}, ignoring.");
Debug.Log($"EOS P2PNAT HandleReceivedMessages: received ping from {peerId.Redact()}, ignoring.");
return null;
}
else
Expand Down
7 changes: 4 additions & 3 deletions Assets/Scripts/EOSStoreManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ namespace PlayEveryWare.EpicOnlineServices.Samples
using Epic.OnlineServices;
using Epic.OnlineServices.Ecom;
using Epic.OnlineServices.Auth;

using Utility;

/// <summary>
/// Class <c>EOSStoreManager</c> is a simplified wrapper for EOS [Ecom Interface](https://dev.epicgames.com/docs/services/en-US/Interfaces/Ecom/index.html).
/// </summary>
Expand Down Expand Up @@ -147,7 +148,7 @@ public void QueryEntitlements(bool includeRedeemed = true)
var uid = EOSManager.Instance.GetLocalUserId();

Debug.Log(
$"[StoreManager] QueryEntitlements() → LocalUserId: {uid}, IncludeRedeemed: {includeRedeemed}"
$"[StoreManager] QueryEntitlements() → LocalUserId: {uid.Redact()}, IncludeRedeemed: {includeRedeemed}"
);

var options = new QueryEntitlementsOptions
Expand Down Expand Up @@ -221,7 +222,7 @@ public void QueryOwnership(string[] catalogItemIds)
var uid = EOSManager.Instance.GetLocalUserId();

Debug.Log(
$"[StoreManager] QueryOwnership() → LocalUserId: {uid}, RequestedIds: {string.Join(", ", catalogItemIds)}"
$"[StoreManager] QueryOwnership() → LocalUserId: {uid.Redact()}, RequestedIds: {string.Join(", ", catalogItemIds)}"
);

if (catalogItemIds == null || catalogItemIds.Length == 0)
Expand Down
2 changes: 1 addition & 1 deletion Assets/Scripts/StandardSamples/Oculus/OculusManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ private void userProofCallback(OculusWrapper.Platform.Message<OculusWrapper.Plat
if (msg!=null && !msg.IsError)
{
OculusWrapper.Platform.Models.UserProof userNonce = msg.Data;
print("Received user nonce generation success. Nonce: " + userNonce.Value); print("id: " + u.ID); print("ocuid: " + u.OculusID);
print("Received user nonce generation success");

callback?.Invoke($"{u.ID}|{userNonce.Value}", u.OculusID);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ namespace PlayEveryWare.EpicOnlineServices.Samples
using Epic.OnlineServices;
using Epic.OnlineServices.Achievements;
using System.Threading.Tasks;
using Utility;
using Debug = UnityEngine.Debug;

/// <summary>
Expand Down Expand Up @@ -287,7 +288,7 @@ private List<DefinitionV2> GetCachedAchievements()
/// </returns>
private Task<(Result ResultCode, List<PlayerAchievement> Achievements)> QueryPlayerAchievementsAsync(ProductUserId productUserId)
{
Log($"Begin query player achievements for {ProductUserIdToString(productUserId)}");
Log($"Begin query player achievements for {ProductUserIdToString(productUserId).Redact()}");

QueryPlayerAchievementsOptions options = new()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public void RequestTokenAndUsername(System.Action<string, string> callback)
appleIDCredential.IdentityToken,
0,
appleIDCredential.IdentityToken.Length);
Debug.Log("Sign-in with Apple successfully done. IDToken: " + idToken);
Debug.Log("Sign-in with Apple successfully done");

callback?.Invoke(idToken, appleIDCredential.User);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ namespace PlayEveryWare.EpicOnlineServices.Samples

using UnityEngine;
using UnityEngine.UI;

using Utility;

public class UILeaderboardMenu : SampleMenu
{
private enum LeaderboardGroup
Expand Down Expand Up @@ -144,7 +145,7 @@ private void QueryRanksCompleted(Result result)

foreach (LeaderboardRecord record in leaderboardRecords)
{
Debug.LogFormat(" Record: UserName={0} ({1}), Rank={2}, Score={3} ", record.UserDisplayName, record.UserId, record.Rank, record.Score);
Debug.LogFormat(" Record: UserName={0} ({1}), Rank={2}, Score={3} ", record.UserDisplayName.Redact(), record.UserId.Redact(), record.Rank, record.Score);

// Display in UI

Expand Down Expand Up @@ -280,7 +281,7 @@ private void QueryUserScoresCompleted(Result result)

foreach (LeaderboardUserScore userScore in kvp.Value)
{
Debug.Log($" UserScore: UserId={userScore.UserId}, Score={userScore.Score}");
Debug.Log($" UserScore: UserId={userScore.UserId.Redact()}, Score={userScore.Score}");

// Display in UI
var copyResult = LeaderboardManager.CopyUserScore(userScore.UserId, out LeaderboardRecord? record);
Expand Down
2 changes: 1 addition & 1 deletion Assets/Scripts/StandardSamples/UI/Login/UILoginMenu.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1361,7 +1361,7 @@ public void StartLoginWithLoginTypeAndTokenCallback(LoginCallbackInfo loginCallb
}
else if (loginCallbackInfo.ResultCode == Epic.OnlineServices.Result.InvalidUser)
{
print("Trying Auth link with external account: " + loginCallbackInfo.ContinuanceToken);
print("Trying Auth link with external account");
EOSManager.Instance.AuthLinkExternalAccountWithContinuanceToken(loginCallbackInfo.ContinuanceToken,
#if UNITY_SWITCH || UNITY_SWITCH2
LinkAccountFlags.NintendoNsaId,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ namespace PlayEveryWare.EpicOnlineServices.Samples
using UnityEngine;
using UnityEngine.UI;
using Epic.OnlineServices.Presence;
using Utility;

public class UIHighFrequencyPeer2PeerMenu : SampleMenuWithFriends
{
Expand Down Expand Up @@ -337,7 +338,7 @@ private bool HasValidCurrentProductId()
{
if (currentChatProductUserId == null || !currentChatProductUserId.IsValid())
{
Debug.LogError($"{nameof(UIHighFrequencyPeer2PeerMenu)} {nameof(HasValidCurrentProductId)}: ProductUserId for '{currentChatDisplayName}' is not valid!");
Debug.LogError($"{nameof(UIHighFrequencyPeer2PeerMenu)} {nameof(HasValidCurrentProductId)}: ProductUserId for '{currentChatDisplayName.Redact()}' is not valid!");
return false;
}

Expand Down
4 changes: 3 additions & 1 deletion Assets/Scripts/StandardSamples/UI/Store/UIStoreMenu.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ namespace PlayEveryWare.EpicOnlineServices.Samples
using UnityEngine.UI;
using UnityEngine.EventSystems;
using Epic.OnlineServices.Ecom;
using Utility;

public class UIStoreMenu : SampleMenu
{
[Header("Store UI")]
Expand Down Expand Up @@ -114,7 +116,7 @@ protected override void Update()

public void OnQueryOffersClick()
{
print("OnQueryOffersClick: IsValid=" + EOSManager.Instance.GetLocalUserId().IsValid() + ", accountId" + EOSManager.Instance.GetLocalUserId().ToString());
print($"OnQueryOffersClick: IsValid={EOSManager.Instance.GetLocalUserId().IsValid()}, accountId={EOSManager.Instance.GetLocalUserId().Redact()}");
StoreManager.QueryOffers();
}

Expand Down
2 changes: 1 addition & 1 deletion com.playeveryware.eos/Documentation~/apple_signin.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ public class AppleExampleScript : MonoBehaviour
appleIDCredential.IdentityToken,
0,
appleIDCredential.IdentityToken.Length);
Debug.Log("Sign-in with Apple successfully done. IDToken: " + idToken);
Debug.Log("Sign-in with Apple successfully done");
Token = idToken;
User = appleIDCredential.User;

Expand Down
Loading