• 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
Question by XxSimBaaxX · May 21, 2017 at 03:14 AM · javascriptnetworkingdatabasewebsitedatabase handling

How can I upload/download data between a website and the game engine?

I was searching for a way to upload/download data between a website and the game engine and I was looking at the previous questions but I didnt find a useful answer, while searching the web I found google's "firebase SDK" for Unity, I dont know anything about websites and databases and my question is that is it possible to use firebase between the game engine and the website for uploading/downloading data? If it is possible then where can I learn that and is there any kind of coding libraries that I can use and is there any tutorials that show how this is done? (I use JavaScript for coding) Thanks for the replies :)

Comment

People who like this

0 Show 0
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

1 Reply

  • Sort: 
avatar image

Answer by toddisarockstar · May 21, 2017 at 09:13 AM

basically you can form a TCP connection and send anything you want to or from an http server with the unitys WWW function it will send raw requests and retrive raw data from any URL.

https://docs.unity3d.com/ScriptReference/WWW.html

if you are wanting to talk to a standard webserver supporting some other standard GET/POST functions i think you might want to check into this though i have never used it:

https://docs.unity3d.com/ScriptReference/WWWForm.html

also you have the full C# net libriary at your disposal if you server has specific needs of control at a TCP or UDP level to form connections. https://msdn.microsoft.com/en-us/library/system.net.sockets.tcpclient(v=vs.110).aspx

really to get a specific answer it depends on how your server is set up? is it an old school web server like appachie? or node? or hand written? or someone else's server allready setup? do you need advise on how to set up a server? Unity will truly talk to anything. if you just want to send recieve in the same way a webbrowser does. just stick to the WWW function

https://docs.unity3d.com/ScriptReference/WWW.html

Comment
Arshd

People who like this

1 Show 1 · 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 XxSimBaaxX · May 22, 2017 at 08:39 AM 0
Share

Thank you for your reply, the questions is that can I use the firebase database to do that?

Unity Answers is in Read-Only mode

Unity Answers content will be migrated to a new Community platform and we are aiming to launch a public beta by June 9. Please note, Unity Answers is now in read-only so we can prepare for the final data migration.

For more information and updates, please read our full announcement thread in the Unity Forum.

Follow this Question

Answers Answers and Comments

4 People are following this question.

avatar image avatar image avatar image avatar image

Related Questions

is it possible to use JSON to insert some component and get some data to save in my database 1 Answer

Looking for step-by-step manual how to configure SQL Lite on Unity 2017 ( or other database) 1 Answer

Firebase with Unity instantiate new data 1 Answer

controlling player objects across a network quetion 1 Answer

Android device not connecting to network 0 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