I have been struggling today and yesterday to add matchmaking and relay to my game. I'm using PurrNet for networking and my game worked with the Purr Transport to test things, but I now want to add actual matchmaking. For the user I want the matchmaking to be as simple as pressing the play button, then an opponent will be found, then they get connected together using client hosting through the Unity relay.
I have read a lot of documentation and forums, both from PurrNet and Unity, but I can't really find the code or solution I need. Sometimes I find something that looks useful, but then the tutorial ends, or it uses an outdated system. So I have been using AI a lot to figure stuff out, but AI is stupid and hallucinating things, and I can't check it's responses if I don't know what I'm doing.
I managed to make something kinda working, but I'm getting the error that I need to call SetRelayServerData() first, but I have no idea where to get the relayServerData from. No documentation talks about this. I looked through this and the readme on github, but I can't find any information.
After looking through the PurrNetNetworkHandler.cs code I found out it's already calling SetRelayServerData internally. And from the debug logs I can see that something is going wrong for the client because it says "Endpoint: invalid". But idk how to solve that.
Do I even need to get the relayServerData manually? Am I doing something else wrong? I have made this script following multiple random tutorials, AI and my own intuition, but at this point idk if I'm just doing something I'm not supposed to?