Is it possible for unity to integrate with web services to pull data from an external data source? I was going to research application.externalcall and create a javascript function in the web page that calls the web service. Is this the correct way to go?
neither unity webplayer nor the javascript run on the server.
They both run on the enduser machine
you will have to use a PHP or ASP.NET page to connect your database with the player, combined with the WWWForm class for example
ok thanks, I’ll take a look at the wwwform class.
You can use the SQL stuff in mono to connect directly to the database, too…eliminating the need for a web server.
Unless you’re in a controlled environment (i.e. a couple of standalones or Web players in a local network, or a game server that’s located “close” to the database), I’d recommend not directly connecting to the database due to security issues.
One thing is that ports usually used for databases should be closed by firewalls - and in those cases your clients couldn’t connect to the database at all. From the other perspective, if you want clients to be able to connect to your database, you have to keep that port open to the public which usually poses a rather severe security risk on your database server.