Is there a way that I can use the unity web player, to take a poll? So, people go to the page, with the webPlayer. With in that project is a poll. Selections are saved and submitted. How would I go about this?
Use OnGUI() and display buttons. When someone presses a button, use WWW to make a request to your web server. Your web server can count the number of times a button is pressed, and send back some data to the webplayer with the poll results.
Thanks.
I understand what you are saying but am unsure how to implement that. Could you be more specific as to how use the www? I don’t know what variable of ww, I would use. I don’t know how this would be stored in my website and how I would retrieve that.
Thanks in advance.
The page for WWWForm shows how you can post data to a web site. It includes some Perl script that runs on the web server, collects the requests, and writes them into a database. That’s probably a good reference to get started with.
Thanks man, but I got to say rrr. Any web stuff seems so abstract to me. I will give it a shot tho.
Cheers.
Well, you probably know that WWW is the way that your Unity app can talk to your web server. What you choose to do on your webserver when it detects these requests is the hard part, and not directly related to Unity.
Yes, I understand.
It will take some research and study in my end as I just don’t “get it”. It seems, to me, extremely abstract, compared to make this object move here and animate.
Thnks.
renman,
If you are using .NET or PHP for your site backend let me know and I can probably walk you though some examples. I can show you how to post data with the WWW class to the server and how to handle that data server-side.