Unity + Fishnet crash course problem
Hello all, new member here. I'm trying to follow the guide at https://rivet.gg/learn/unity/tutorials/fishnet/crash-course (Testing locally section for now). I think the steps might be outdated? After running
rivet init I only got the yaml file created and the game linked, but no token was provided.
I checked the dashboard and found this command: rivet token create dev -n staging, so I created the token that way.
However after I put the token in the RivetManager in the Main scene and try the game, I get this error:
Any clues on what could be wrong? Thanks in advance!30 Replies
Hey! Ya, those docs are out of date. I think I have a mostly-finished version of the new crash course, let me see if I can get that out ASAP
For the time being, there are some updated instructions on the plugin GitHub repo, do you want to try following them? https://github.com/rivet-gg/plugin-unity
GitHub
GitHub - rivet-gg/plugin-unity: Plugin for Rivet + Unity
Plugin for Rivet + Unity. Contribute to rivet-gg/plugin-unity development by creating an account on GitHub.
Sure, thanks! I'll give it a try
Ping me as you run into issues, I'll make sure you can get up and running ๐๐ป
will do, thanks!
Ok, I do have the code for Unity example, let me see if I can get that merged soon at least
Well idk if its related but in diep lately sometimes people gets this message and cant connect
This doesn't seem related to this thread, feel free to open another thread if you need :ferristhumbsup:
Ok so I downloaded the plugin and imported it, and linked the project with it. I'm a bit unsure what the next step is to be able to test locally. I created a ParrelSync clone and also linked it.
I clicked "playtest" and "this machine", but I don't think the server is starting. Maybe I'm missing something else in the scene? I'm using the same example project
This is what the console show when game starts

Hmm I'm not sure if I've set up a server running locally in the background yet. That setting will work if you manually host a local server, and when you make a request to Rivet to find a lobby, it will give you a link that points to localhost.
I think that if you build and run a server docker container, it should start a local server
This is the Dockerfile I have for it:
But that does rely on a LinuxServer binary being built. That should be doable from the plugin
ok thanks. You mentioned earlier that you might update the example project, is that something planned for the near future?
here I mean, unless I misunderstood something
Ya, I'm getting some items resolved on the Godot plugin right now, but Unity is next on the list ๐ฏ
But I can at least push the branch for now, even if it's not ready to merge
One sec
Ok @Pelax, there is some stuff like in the image that I have to fix, but you should be able to play around on that branch. It should be able to just run, but lmk if you find any hiccups
https://github.com/rivet-gg/examples/pull/26

sounds awesome! Thank you for this!
Ok got 2 more questions whenever you get the chance:
1- I couldn't figure out how to test locally. What would be the docker command to build that image?
2- I used "Build and Deploy" button and that seems to have worked. However when I tried to join from the unity client, I see the lobby and it doesn't get ready most of the time. It shows this:

It does work sometimes, but I'd say it's maybe 10% or less success rate
Is that a normal behaviour or is there some setting wrong? The 2 errors I see most times are these:
In any case, feels good to finally see it working at least partially, thanks for the assistance!
From in the Rivet hub, what do the logs say?
So like if you go to the logs tab on the left, and click the most recent lobby
lol now that I'm trying to get you logs it's joining every single time
Something is wrong for sure, but this is on our end. I have this happen sometimes when doing Godot builds, it goes away after some point. For now, it seems erroneous, and isn't super consistant
We're debugging it right now, I'll get back to you with updates on it
cool, good to know! Thanks again for your help
Hi, hope everything is going well ๐.
I was wondering if there are any samples using fishnet 4 in the works?
@AngelOnFira BTW I've tried to use the latest mirror version, it only required a few adjustments. I can build servers and deploy them, however I'm getting a new generic error when I try to connect:
Is that "ray_id" value useful to track the problem? No lobbies get created in the dashboard
Hmm, let me take a look at what's being used right now
Ah yes, that would be a good item to do. I haven't built any demos with fishnet 4 yet, but we have been thinking about extending the plugin to come with helpers for different networking libraries. That still needing development though. I presume you're looking to use Fishnet 4?
Yes that's the plan in this project. Adapting your sample wasn't hard though, just changed the
[SyncVar] to SyncVar<type>. And one handler signature I think.
However since no lobbies are showing up in the dashboard I thought maybe it wasn't a fishnet problem?
The server built fine after the changesAh, great to know ๐ that shouldn't be hard for me to make a demo with
oops meant to reply to that for something else ๐
Regarding this error, have you seen it pop up today? We just deployed a fix last night that worked on the Godot side
This error is interesting. I'll check out the ray on that one
Ya, rays are for us to be able to track what functions/sql statements are made internally :ferristhumbsup:
I haven't seen that one, only the new one shows consistently
Alright, I'll get back to you once I know more on that ๐ฏ
Some extra info, I tried your example without changes (from the branch you shared the other day https://github.com/rivet-gg/examples/tree/05-30-feat_update_unity_bomber_example)
I built and uploaded it, and I got the same error. Ray id was "0f5e3196-1812-47e5-9bc4-4ac9d7ef925b"
Sounds good, thanks for that!
Can you send me an invite to your team on the Rivet hub?
forest@rivet.gg
Also, just wanting to check, what's in your rivet.yaml?I think I've reproduced the issue on my end, where I deployed a version with a minimal rivet.yaml, like
and although it doesn't throw an error during upload, it needs the matchmaker field to properly do the upload. More information about that file can be found here (https://rivet.gg/docs/general/config#matchmaker), though examples will likely work better for you (say this example https://github.com/rivet-gg/examples/blob/c46ce4d1f6886446edc156913ad7aff9f3d9c341/javascript/tanks-socketio-canvas/rivet.yaml)