現在、facepunch の steamworks ライブラリの p2p ライブラリを使用しようとしていますが、次のエラーが表示されます。
これは、P2P 接続用の私のコードです。
using System.Collections;
using System.Text;
using System.Collections.Generic;
using UnityEngine;
using Steamworks;
public class FacePunchSteamPeerToPeer : MonoBehaviour
{
// Start is called before the first frame update
void Start()
{
SteamNetworking.OnP2PSessionRequest = (steamid) =>
{
print("Accepting User");
// If we want to let this steamid talk to us
SteamNetworking.AcceptP2PSessionWithUser(steamid);
};
SteamNetworking.OnP2PConnectionFailed = (SteamId, P2PSessionError) =>
{
print(P2PSessionError);
};
}
// Update is called once per frame
void Update()
{
if (Input.GetKey(KeyCode.R))
{
byte[] mydata = Encoding.ASCII.GetBytes("Hello");
SteamId TargetSteamId = (SteamId)76561198017227431;
var sent = SteamNetworking.SendP2PPacket(TargetSteamId, mydata);
}
while (SteamNetworking.IsP2PPacketAvailable())
{
var packet = SteamNetworking.ReadP2PPacket();
if (packet.HasValue)
{
HandleMessageFrom(packet.Value.SteamId, packet.Value.Data);
}
}
}
void HandleMessageFrom(SteamId steamid, byte[] data)
{
print("Data Received");
}
}
何が間違っているのか、そのエラーが何を意味するのかわかりません