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 Mandy · Oct 26, 2015 at 12:32 PM · networkingphotondatabasemysql

PUN and mysql database

Hey Buddies, I want to know if I want to use an existing database made in mysql for authentication in PUN, How can I do that? See I have a game made in native and now I want to make that game in unity but I want my old users not to sign up again so that is why I need my old Mysql data to be used for authentication. Now, first If I can do that by using the custom server authentication then how I can use that and how it will link to my database? and if Not then How can I achieve this? According to me connecting to photon and database separately is not a good option, so please suggest me something like this that I have to make just one connection to photon and from that I can access my database to.

Regards, M_Yadav

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

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by Landern · Oct 26, 2015 at 01:01 PM

The documentation spells it out for you (Custom Authentication PUN), Pun will receive the authentication information(i.e. user/pass combo) which will be passed to your server in a query string.

So client side you will use Unity's GUI(or whatever you'd like) to allow the user to input their User and Password values. This will be passed to a base URL that you specify in your PUN account.

Example: http://www.exampledomain.com/login?user=userNameFromUnityUIControl&pass=passwordFromUnityUIControl

You will need to create a server side application/script to parse and check your MySQL database. They have put up a MVC(.net/IIS setup) example on github(https://github.com/exitgames/photon.custom-authentication/blob/master/src/Asp.Net.MVC/ExitGames.Web.Sample/Controllers/ClientController.cs). That is just for the login controller. You should use Ruby or PHP or whatever floats your boat. The important thing is to send back the correct json result/response to indicate whether the authentication request was successful or a failure. The server side part is completely up to you and your mileage will very depending on what YOU want to support on the backend.

PUN gets you part of the way there, you have to do the rest.

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

3 People are following this question.

avatar image avatar image avatar image

Related Questions

Unity MySQL database? Saving data to a database available to any player. 0 Answers

How can I create a database with a Photon Network Server? 1 Answer

Making a user database with photon? 0 Answers

[Unet] A dedicated server. Database? Security? Speed? 1 Answer

[Photon] Looking for example code for late joining clients syncing instantiated game objects that don't exist in the base scene 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