Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Saving a Username

Discussion in 'Scripting' started by Jana1108, Sep 21, 2015.

  1. Jana1108

    Jana1108

    Joined:
    Jun 27, 2015
    Posts:
    215
    Hi, can someone help me write a CSharp script that will ask the user their choice of username on the FIRST and only first time they open the game, and then save it permanently so it saves even when they close and reopen the game. I also don't want the game to ask them for their username twice, just the first ever time they open the game.
     
  2. GroZZleR

    GroZZleR

    Joined:
    Feb 1, 2015
    Posts:
    3,201
  3. Jana1108

    Jana1108

    Joined:
    Jun 27, 2015
    Posts:
    215
    Thanks for your reply :) I knew it would have something to do with Player Prefs but I'm still not sure exactly how I would code it... are you able to help?
     
  4. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    20,004
    What do you have already?
     
  5. Jana1108

    Jana1108

    Joined:
    Jun 27, 2015
    Posts:
    215
    Nothing ...
     
  6. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    20,004
    You do realize this is trivial knowledge for practically anyone who has spent the time to go through the actual learning section on this site, right? It sounds to me, especially after reading your other threads asking for help, that you basically want someone to write your game for you. We do have a Job Offering section for that you know.
     
    Firebrand likes this.