Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 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
0
Question by JackMac290400 · Aug 21, 2016 at 06:09 PM · mobiledatabasewebsitesqlconnect

How to connect a mobile app to an online database?

Hi, I am developing an app which requires the use of online databases, one will include login information and the other will contain data which will contain data for the app.

The first database will obviously send data to the database when someone signs up and it will request data when someone logs in.

The second database will require the app to send data to be used in queries on the database to find relevant information for the user which will then be sent back to the app.

I have never attempted any networking of any kind before so for me this is quite daunting so if anyone could shed some light on how I would achieve this I would be most appreciative.

I also haven't set up an online database before so if someone could help me with setting that up as well that would be great, thanks!

  • know this is for unity only but in addition to the app, I want to make a website which will need to interact with these databases in the exact same manner, so if at all possible could someone help me with this as well

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
0
Best Answer

Answer by DiegoSLTS · Aug 21, 2016 at 06:22 PM

From Unity's side you only need to use the UnityWebRequest class (or WWW if you're using an older version of Unity).

For the database... you shouldn't just put the database online, you must write a webservice that access the database, and from Unity you do http requests to the webservice. This means writing some server logic in the language and framework of your choice. There are a lot of options for this and it's something totally independant to actual Unity development, so I won't name alternatives, do some research on webservices and you'll find a lot of good info.

Your web service logic will also be accessed from your website later, you'll probably write the page in the same language and framework used for the webservice.

Also, writing a web service is just that, writing, you'll also need to host the service and the database somewhere accesible from the internet. It can be a machine owned by you, that you setup to be accesible through internet or you use a free or paid hosting service for that.

Comment
Add comment · 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 JackMac290400 · Aug 21, 2016 at 06:34 PM 0
Share

Thankyou, I got the general concepts of how this stuff worked but this has really filled the blanks in that confused me. Thanks for a quick response as well!

avatar image
0

Answer by wsgb · Aug 22, 2016 at 05:08 AM

You can also use a service for this such as https://playfab.com/ which would be easiest for you in my opinion.

Otherwise you can learn a web framework (like Rails or NodeJS, .NET, ect) and setup what @DiegoSLTS mentioned or something similar.

Check this out also https://www.youtube.com/watchv=EByl95OMG2o∈dex=1&list=PLTm4FjoXO7ndjPE8JXrJ9MjMfsJv956Qm

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

65 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Best way to connect to database for my mobile game? 3 Answers

Hosted Database for Mobile Game 0 Answers

Can't connect from Unity 3.1 to SQL Server Express 8 Answers

[Quiz game] How do I make players contribute with questions? 1 Answer

need help wit unity and mysql 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