Hello
am creating a project whit unity3d for my thesis and I need to create a database to be able to put end get information when I need it
can you tell me how to make it
tenks
The easiest way to use a database with Unity is to access it via a webserver with the WWW and WWWForm classes. The standard example of how to do this is the server side highscores system on the Unify wiki. This describes how to use the SQL and PHP to provide the webserver interface and also the Unity code to interact with it.
I’m trying this tutorial but I do not work
If your php/mysql environment is set up properly, the server side highscore tutorial angry ant referenced will work like a charm. Also, make sure you import the MD5 script as described in the tutorial, and that you use the same MD5 keyword in your Unity and PHP scripts.
but when i build project I create the file index.html or index.php?
help me plese is very important
php
and how do I create it
unity3d create html file no php
Have you actually created your database etc? Just wondering what stage you are at.
The php files can just be made in a text editor (notepad or similar), these need to be uploaded onto your server. This has nothing to do with the files Unity makes when you create a web build.
Maybe read up on php, sql (to insert and retrieve data) and your database engine and get the returning of results etc working in a browser first before trying to connect Unity.
This helped me a lot to get the basics right!
Kind regards, Robert
I created the database
I use artervista as webserver
I upload the php file on the server but I how to build unity project?
hello guys I have problems with this tutorial I respect all the steps but I do not work soon put a video asking for your help
i have create this video
i couldn’t read your php file to the end but i think it’s wrong.
I saw some mysql escape strings which i don’t think are needed.
this is my query in php which i use to see if a user is valid :
$query = "SELECT * FROM `unity` WHERE `username` LIKE '$user' AND `password` LIKE '$pass' LIMIT 0, 30 ";
$result = mysql_query($query) or die(mysql_error());
$row = mysql_fetch_array($result) or die(mysql_error());
if($row = 2)
{
echo "valid";
}
you can also echo $row[‘user’] and so on…
you can also test your php file by entering the string in a webbrowser.
the video is low quality will come in a video in HD so you can review it and help
i have create a new video in hd
For see this video select 720p HD end see in full screen
i attend help plese
boy help me plesee see video
the steps is correct
i don’t understand your web setup so best you can do is test your php/pl files to see if they work.
you can test it by doing something like :
http://yourwebserver.com/yourscorespage.pl enter it in the webbrowser and see if the page gives the scores output. you can test mine by doing :
http://www.edje.net/myGame/checkLogin.php?username=Eddy&password=Appels and it will give valid as answer. You should get your scores displayed on the site if the php/pl files work.
if i test lick
http://www.altervista.org/unity_test/display.php
appar error why?
i heve insert the php in webserver
but altervista is good o no?
appels
i have test the php file
http://testgiocofb.altervista.org/unity_test/display.php
the score see
but not work in unity3d why?
wowwwwwwww the read work now i have exenge localhost whit
ok now how i can put the score in database how i use postscore function