This project will hep you to connect your unity project with database.Here are the steps below as :-
- Install any localhost Database. I installed XAMPP. Install it in default directory = C/xampp.
- Now download the project files uploaded here. Uploaded files contains:
a. PHP files folder containing 3 php files.
b.A unity project named as Working with Database. - Now go to C/xampp/htdocs and paste the PHP files folder there.
- Open xampp and click on 'Start' on Apache and Mysql.
- Now Go to web browser and open localhost/phpmyadmin.
- Create the Database and a table.
- Insert some dummy entries for testing in the table using insert tab in the upper menu.
- Now open the SelectScript.php file and see the comments and make necessary changes in the script as per your naming conventions.
- Then go to webbrowser and paste the address of the SelectScript.php file in the web browser.
- The messgaes will be shown on the basis of the results.
- Download and extract the .rar file and this is the unity project.
- open the UnityInsertion script from the PHP files folder and read the comments and understand the code and make necessary changes you like.
- Open the scene and select main camera, you will see 2 scripts on it.
- Open Data loader and read the comments and start working on it.
- Now remove this script after usage and now read the contents of the InsertingData script and make necessary changes to the name of the variables.
- Ask cquestions if you have any doubts and raise issues if you have any....