Skip to content
Open
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/EOSHighFrequencyP2P.cs
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ private void OnRefreshNATTypeFinished(ref OnQueryNATTypeCompleteInfo data)

public void SendMessage(ProductUserId friendId, string message)
{
if (!friendId.IsValid())
if (friendId == null || !friendId.IsValid())
{
Debug.LogError("EOS P2PNAT SendMessage: bad input data: account id is wrong.");
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,12 @@ public void ToggleHighFrequencySending()
{
if (Peer2PeerManager != null)
{
if (!Peer2PeerManager.sendActive &&
(currentChatProductUserId == null || !currentChatProductUserId.IsValid()))
{
Debug.LogWarning($"{nameof(UIHighFrequencyPeer2PeerMenu)} {nameof(ToggleHighFrequencySending)}: Select a valid peer before enabling high-frequency sending.");
return;
}
Peer2PeerManager.sendActive = !Peer2PeerManager.sendActive;
}
}
Expand Down