I need to build a server that stores and sends player data with c# in Unity

So, This definitely already exists, but my google-fu is weak and I am very much unexperienced with both c# and Unity.
I am working in a project that needs to store players data into a server and them retreive the server, must have the authentication too, but I can’t find the necessary content to build that, the other dev in the project said it should be better to use Python, i could build it with python, but i’d still have issues building the client side with c#.
Could anyone lend me some good juicy material about how to create’em? Not expecting anyone to teach me here, but I think more experienced developers must have some sources I could explore, riiiight?

Welcome to the forums. Your question is a very difficult one to answer.

You don’t really know C# or Unity, so I’d say the first place you may want to start if you want to make a game in Unity would be to do that. The C# Yellow Book is a pretty popular resource for learning the language, and Unity Learn is a decent enough starting place to pick up the fundamentals of Unity.

Once you know what you’re doing, you probably want to spend some time building some UI-focused experiences, since that’ll likely be the visible part of your network code. Being able to navigate between screens, have fields you fill in, and show a response from the server are pretty basic elements to get going with auth.

Google Firebase is a great authentication option for both hobbyists and professionals, but like anything, it’s something you have to learn to use and won’t just be spinning up in an afternoon.

And since you mentioned it, let’s go ahead and talk about Googling. It’s very difficult to understate how important it is to be able to search for information when you’re a developer. I mean, it’s important for everyone, but as a developer, you’re going to be doing a lot of it. And if you don’t know how to effectively search for information, you’re not likely to ever find it. As it happens, I actually typed “how to google issues as a developer” into the search engine, and the second result was this great little blog article about the subject. It’s also worth pointing out that the more knowledge you have, the easier it’ll be to find out what knowledge you don’t have, as you’ll know what things are called to be able to look them up and things like that.

So to answer your question, which I’ll paraphrase as “How do I build an authentication/data server and incorporate it into a Unity project?”, the answer is: You don’t. Not yet, anyway. You need to figure out what you’re doing first, and only then should you be looking into the more advanced subjects of networking or client/server interactions. If you jump into the deep end before you know how to swim, you’re just gonna have a bad time and give up. Spend the time learning and building up experience, and I’m confident you’ll know when you’re ready to tackle this task.

Good luck!

1 Like

So…I understand what you meant, and, yeah, I don’t have much knowledge about c# or unity engine, but I’m not a complete rookie in development, I’m just migrating from web to game dev, I thought I could build the server side with node and then make the client side with c#, reading some references and then trying to explain 'em to a rubber duck -q
Sorry if I sent the vibe that I never programmed anything before, my bad and also, thanks for the links, I will read them all later! And thanks for the advice

I see. I guess I’m confused by your question, then. If you’re good with spinning up a Node service to handle authentication and player data storage, just do that. Unity has the ability to make web requests to your API endpoints, and you’d just handle the response in your C# scripts (in Unity).

I see no reason why your web service has to be written in one language or another. I guess the fact you didn’t express that yourself to your friend is what suggested to me a lack of development experience on your part. Since you’re not building the server app with Unity, there’s zero reason it has to be written with C#.

1 Like

Yup, there’s no reason why you can’t make the server in Node.js or any other language/framework you’d like to use. The server can be any typical REST API that the Unity client can communicate with via HTTP requests.

See the UnityWebRequest documentation for sending HTTP requests in Unity.

1 Like