Skip to content

Commit

Permalink
chore: removed debug logs
Browse files Browse the repository at this point in the history
  • Loading branch information
momintlh committed May 10, 2024
1 parent 76811f8 commit 6fa2d2c
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions Assets/PlayroomKit/PlayroomKit.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1078,7 +1078,7 @@ private static void InvokeRpcRegisterCallBack(string dataJson, string senderJson


List<string> updatedRpcCalledEvents = new();
// This state is required to update the called rpc events list
// This state is required to update the called rpc events list, (Temp fix see RpcCall for more)
string nameJson = GetState<string>("rpcCalledEventName");

JSONArray jsonArray = JSON.Parse(nameJson).AsArray;
Expand All @@ -1088,12 +1088,6 @@ private static void InvokeRpcRegisterCallBack(string dataJson, string senderJson
updatedRpcCalledEvents.Add(item);
}

Debug.Log("\n\nupdatedRpcCalledEvents: ");
for (int i = 0; i < updatedRpcCalledEvents.Count; i++)
{
Debug.Log(updatedRpcCalledEvents[i]);
}

foreach (string name in updatedRpcCalledEvents)
{
if (rpcRegisterCallbacks.TryGetValue(name, out Action<string, string> callback))
Expand Down Expand Up @@ -1136,7 +1130,8 @@ public static void RpcCall(string name, object data, RpcMode mode, Action callba
string jsonString = jsonArray.ToString();
/*
This is requrired to sync the rpc events between all players, without this players won't know which event has been called.
this is a temporary fix, RPC's need to be handled within JS for better control.*/
this is a temporary fix, RPC's need to be handled within JS for better control.
*/
SetState("rpcCalledEventName", jsonString, reliable: true);

RpcCallInternal(name, jsonData, mode, InvokeOnResponseCallback);
Expand Down

0 comments on commit 6fa2d2c

Please sign in to comment.