- Home /
extract website information to unity project
Hello guys. I'm on a college project where i need to extrat information from weather website to change my unity project weather. how do i extract it and how do i put it on unity? Any ideas?
Answer by code-blep · Sep 27, 2012 at 10:29 PM
Hi t.pedrob,
First off you are probably best to find a Weather service that has an API that allows you to access weather data for a specific location. The weather channel supplies one but you may have to pay for it, here is a link to it: http://portal.theweatherchannel.com/ There will be other similar services out there and some may be free.
On how to get that data into Unity, I would personally use a webserver that pulls that information in, and a script that will pull apart that data and turn it into some kind of plain text file.
From there you can code Unity to Pull in that information using the following as a start point: http://answers.unity3d.com/questions/12598/help-me-about-reading-txt-file.html
After that get Unity to read and react to the values.
That is of course a super simple example, and other may know of an easier way, but it's a starting point I guess ;)