x


unity3d connect to php or coldfusion for database information

I want to be able to pull data from a database and assign that data to variables via unity3D. I would like to do this using AJAX or a similar system to get real time updates on the data, either retrieving the data or updating the database. I'd prefer to do so via functions in either a PHP file or Coldfusion file running on a public server. I'm not looking for simple high scores posting page or anything like that. Does anyone have some links or advice to get started?

more ▼

asked May 23 '10 at 12:15 AM

aLucidWorld gravatar image

aLucidWorld
67 14 14 22

(comments are locked)
10|3000 characters needed characters left

2 answers: sort voted first

I ended up using smartFox server to update the same database that the Coldfusion server is using for data calls.. seems to be the only way to achieve the result I wanted.

more ▼

answered May 29 '10 at 06:08 AM

aLucidWorld gravatar image

aLucidWorld
67 14 14 22

(comments are locked)
10|3000 characters needed characters left

You can use the WWW class in Unity to make HTTP post requests to any webserver of your liking. You have a wide variety of options available on the server to accept and deal with that request. (php, .net, python, perl, etc)

more ▼

answered May 23 '10 at 09:58 PM

Lucas Meijer 1 gravatar image

Lucas Meijer 1 ♦♦
8k 19 43 85

But I can't send data back to the unity client with a post or get method can I? I mean, to a point, but not a several hundred row query.. the GET response would be ridiculously long. Can you connect to components, like you would with ajax? Do you have any links to get me started?

May 25 '10 at 08:34 PM aLucidWorld
(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x232
x131
x102
x2

asked: May 23 '10 at 12:15 AM

Seen: 3204 times

Last Updated: May 23 '10 at 12:15 AM