Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 11 Next capture
2021 2022 2023
1 capture
11 Jun 22 - 11 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
2
Question by Brad Hutchins · Jan 17, 2010 at 04:00 PM · webplayerdatabase

Web Player and DB communication

So how would the web player communicate to a DB backend. It has to somehow or that Tiger Woods game would not work. Do I have to send messages to my web browser which in turn sends JSON messages to a DB middleman like Rails?

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

2 Replies

· Add your reply
  • Sort: 
avatar image
4
Best Answer

Answer by duck · Jan 17, 2010 at 05:43 PM

Yes, the 'middle-man' idea is pretty much correct. You use the WWW class in Unity to make POST or GET calls to scripts which reside on your server, which in turn talk to the database which is often also on the same server.

These server-side scripts are generally written in php, asp, perl, or some other server-side scripting language. The scripts receive data from your webplayer and then talk locally to the DB. If the data is sufficiently complex, you might want to use a data format such as JSON, however often it's enough to just have a few named parameters which the script accepts.

There's a good example in the manual which shows you how you can use these features to send and retrieve high score data to a server-side scoreboard, here (it's after the PNG example):

http://unity3d.com/support/documentation/ScriptReference/WWWForm.html

Comment
Add comment · Show 3 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Brad Hutchins · Jan 17, 2010 at 06:08 PM 0
Share

I know the Web player for Unity is for... Duh... Games. But I saw a lot of users of Unity use it for non-Game apps, but usually fairly graphical ones. That is what I am thinking. To not only develop games in Unity, but to also use it to develop an RIA for my day job ins$$anonymous$$d of use of Silver Light or Flex/Flash because the Unity Web player is meant to be interactive where (at least flash) is a modified movie file.

avatar image duck ♦♦ · Jan 17, 2010 at 07:14 PM 1
Share

Yes, you can send whatever data you like via the WWW class. Eg, the other example on that page I linked to shows how you can send a PNG file to your server.

avatar image duck ♦♦ · Jan 17, 2010 at 07:15 PM 0
Share

Whether unity is a suitable platform for whatever RIA you're considering is another matter, however! :-)

avatar image
1

Answer by Ashkan_gc · Jan 17, 2010 at 07:34 PM

games like tiger woods or fusion fall use .NET sockets to connect to other applications using TCP/UDP ports. for database connectivity you can use the above approach or use DB connectivity APis. then you can use ODBC to manipulate your database. take a look at these links database connection i think you can use many of the managed providers too but i did not test it. sockets the serverside script based approach is good in some situations if you know server side scripting languages well.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

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

Answers Answers and Comments

No one has followed this question yet.

Related Questions

Unity Web Player Failed To Download Data File 1 Answer

Retrieve the data from the Webserver Database 0 Answers

Webplayer<->Database 0 Answers

SQL in web player 3 Answers

Saving Huge strings over the web 3 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges