private void onP2PConnectionRequest(SteamNative.P2PSessionRequest_t o) { if (OnIncomingConnection != null) { var accept = OnIncomingConnection(o.SteamIDRemote); Debug.Log("Accepting Incoming Connection: " + accept); if (accept) { Debug.Log("Accepting..."); networking.AcceptP2PSessionWithUser(o.SteamIDRemote); } else { Debug.Log("CloseP2PSession..."); networking.CloseP2PSessionWithUser(o.SteamIDRemote); } return; } else { Debug.Log("OnIncomingConnection is null"); } // // Default is to reject the session // networking.CloseP2PSessionWithUser(o.SteamIDRemote); }
private void onP2PConnectionRequest(SteamNative.P2PSessionRequest_t o, bool b) { if (OnIncomingConnection != null) { var accept = OnIncomingConnection(o.SteamIDRemote); if (accept) { networking.AcceptP2PSessionWithUser(o.SteamIDRemote); } else { networking.CloseP2PSessionWithUser(o.SteamIDRemote); } return; } // // Default is to reject the session // networking.CloseP2PSessionWithUser(o.SteamIDRemote); }