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
2
Question by Taylorlgoodwin · Aug 13, 2016 at 03:28 PM · server.netsqldatabase

Making a RESTful application with Unity and Azure

I have a fairly complicated question and I have spent the last week researching to find an answer. I will do my best to break my question down into sections, please feel free to answer pieces if you don't know the whole solution!

[OVERVIEW]

I am trying to make an app for education with unity but I need to setup a database in order to handle things like login and student scores. The app will be a WebGL build hosted either on Azure or Itch.io. Ideally I will have the client call a function on the server and ask it for information, then have the information returned. I would also need to be able to send parameters for the server to make the queries against the database. For example, a user attempts to login by putting their username and password into the client. The client sends those two pieces of information to the server for validation. The server checks if the two pieces match and sends the result back to the client. Unfortunately it isn't exactly clear how I should do this in the most effective way. In the next section I will break down the problems.

[PROBLEMS]

  1. Sending information from Unity. Unity has a built in class called UnityWebRequest which is supported in the WebGL build. With this class I should be able to send a request to my server and get a response back. The problem is I am not quite sure how to structure the data so I can read it on the server. I think that it should be sent as JSON data because that is one of the ways to communicate with HTTP. It is also a little unclear exactly what the http address for my functions will be when I call them on the server, but I will get more into that in the next section. In summary The question is how do I structure the data to be sent so I can parse in on the server.

  2. Building functions in the cloud. Using Azure I think there are a few ways I could handle this, but I am not sure which would be most appropriate. I could use Easy APIs, which are associated with a mobile app and linked to my database. I could also use the Function App and just write different functions to handle the queries. Or I could build a .net application in Visual Studio and publish it to Azure. This part is more of a please advise section, as I believe I can do what I need to do with any of those options. I am also confused on exactly what the url for the function being called would be.

  3. Receiving the data from the HTTPRequest. This seems pretty tricky to me. I have seen examples in both node.js and asp.net that take in information and query a database, but it still seems complicated to me. If someone could maybe just mock up an example for my main problem I think it would be very helpful, IE. passing a username and password and pulling those pieces of information out of the request.

  4. Sending the information back to the client. It seems like the best way to handle this is just to format the data as JSON and pass it back through res.Send() or something equivalent in c#. Again I think an example will be the most appropriate here.

I had no experience in this prior to last week and apologize if any of my assumptions are really bad. Ultimately any advice or examples would be most helpful.

Thanks!

Comment
Add comment · Show 1
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 taxvi · Mar 05, 2017 at 02:13 PM 0
Share

BU$$anonymous$$P! any progress on this one?

0 Replies

· Add your reply
  • Sort: 

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

4 People are following this question.

avatar image avatar image avatar image avatar image

Related Questions

a question about Client/Server programming in Unity 1 Answer

Issue with TLS and X509 authentication 0 Answers

Smart way of using servers and databases in unity 0 Answers

Unity networking tutorial? 6 Answers

Instantiate .fbx to object from MySQL Database query 1 Answer


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