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
1
Question by DarkHype · Apr 15, 2010 at 07:13 AM · loginrpg-gameregister

How can i make some kinda Login System?

Hi peepz!

I'm wondering if you guys/girls could help me with my problem!

I need some kind of Login System thingy i know how to make the Password field and the Text field but this is my problem i dont know how to save the login details so you can exit the game without registering again and start all over!

If you can help me with this problem i would be so happy!

Thx in advance!

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
7

Answer by duck · Apr 15, 2010 at 01:19 PM

Typically, log-in systems are implemented using server-side scripting languages, such as PHP, Perl or ASP.

In this way, your unity player would act as a 'client', and would send the username & password which the user typed to the server. The server then looks this up in the users database, and gives the appropriate response.

If you are not using a server/client model however, you'll need to provide more information about how you are planning to have your registration system to work. Should it be that all user's information is stored on one machine? (this means if a user goes to play on another machine, their login & saved data will not be present).

See this answer:
How can I send a string or integer value to server side scripts or web services?

And google for login systems in your chosen server-side language:
Simple Log In System in PHP
Simple Log In System in ASP
Simple Log In System in Perl

These should get you on your way!

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
avatar image
2

Answer by Cyclops · Apr 15, 2010 at 02:01 PM

What Duck said. :) But to add some detail, you might want to read How Unity Communicates with the Browser. In particular, there are two functions:

SendMessage allows HTML Javascript to call a Unity object's function.

Application.ExternalCall lets Unity call HTML Javascript function.

By HTML Javascript, I mean the Javascript in the web-page's HTML - as opposed to Unity's own Javascript :)

So with these functions, you have two-way communication between your web-page HTML, and your Unity game. The HTML can handle any kind of authentication you need, and pass the results to the game.

As Duck says, you still have to implement the login checking somewhere, but at least these functions make it easier to pass the results to Unity.

Update: take a look at: Unity Browser Cookie Equivalent, it may be what you're looking for. It's a way of saving player preferences.

I'm surprised Duck hasn't already linked it. :)

Comment
Add comment · Show 4 · 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 duck ♦♦ · Apr 15, 2010 at 04:33 PM 0
Share

I think for a server-side log-in system you wouldn't necessarily want to communicate with browser-based javascript functions. $$anonymous$$ore commonly you'd communicate directly with the server using Unity's WWW class.

avatar image DarkHype · Apr 16, 2010 at 01:55 PM 0
Share

i meant just make an file that contains the username and password and you register in game and you username and password are saved in a .txt file or something!

avatar image Cyclops · Apr 16, 2010 at 06:06 PM 0
Share

If you're using the Web-browser version of a Unity game, then you can not write files on the player's PC, for security reasons. So you still have to communicate the login information to the server side. See @Duck's first link for how to do that.

avatar image DarkHype · Apr 17, 2010 at 09:15 PM 0
Share

Im not going to make a website version its just download and play

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

1 Person is following this question.

avatar image

Related Questions

Login and flying script 1 Answer

Unity 3d How to make a register and login system 2 Answers

Make a Register/Login page using html and then use it to log into a Unity Game,Hi! 1 Answer

Unity Gaming services not working 1 Answer

How to make a mmorpg login and register system 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