- Home /
The question(s) are too unspecific / complex for a single answer. Not enough context provided.
Mysql PHP connection for a user balance and XP
I am new to Unity and am currently learning how to code in C Sharp so please try and keep things as simple as possible. Ok, so what I really want to do is have an Sql database that I can connect to from inside unity, search through the database until it finds the correct "Name/Id" this would need to be a varchart as I am storing my username as a string I am pretty sure, it would then send the current balance and XP back to the client so I can use the value in game, also I need to be able to edit the balance. Apologies for my poor explanation, I am still very new to this and am not really to sure how this would work. Many thanks!
This question is way to vague / not specific enough. You basically ask for a complete solution. It's also hard to deter$$anonymous$$e what "level" of experience you have with PHP, SQL and C#. Things you have to tackle are:
database design. So based on the data you want to store you have to create a database structure.
webservice interface. You need to define and create methods which allows you to query / read and update / write to your database. Either have seperate PHP files for each method or use command parameters.
If you want to have true user accounts things gets way more complicated. You need methods to create accounts, change password, ...
With user accounts you also need either some sort of login, or pass the username / password with each request.
On the client side you would need to create a class with some methods to perform all those requests on your webinterface.
"please try and keep things as simple as possible", well a complete user account system is far beyond simple, especially for beginners.
UnityAnswers is not a place to request complete tutorials. It's for concrete simple and concrete problems.
Read the FAQs, especially the sections "What are the guidelines for writing good questions?" and "Some reasons for getting a post rejected".
Follow this Question
Related Questions
Player interaction in multiplayer. 0 Answers
Hosted Database for Mobile Game 0 Answers
Connection between menu and scene 2 Answers
Database entegration or data storage 0 Answers