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

Store data from Input Field (4.6 GUI)

Discussion in 'UGUI & TextMesh Pro' started by Hydrax, Sep 11, 2014.

  1. Hydrax

    Hydrax

    Joined:
    Aug 2, 2014
    Posts:
    18
    Hi there,

    I have a main menu in my game an it has a input field. I want to get the data from that input field and display it in the next scene. If anyone has any ideas on how I could do that that would be fantastic!

    Thanks

    Hydrax
     
  2. Edgaras-Randis

    Edgaras-Randis

    Joined:
    Jul 8, 2014
    Posts:
    20
    Which part is confusing you? Getting the value from input field (InputField.value) or saving and retrieving it in the next scene?
     
  3. Hydrax

    Hydrax

    Joined:
    Aug 2, 2014
    Posts:
    18
    Basically everything you said. I don't know much about this new GUI system
     
  4. orb

    orb

    Joined:
    Nov 24, 2010
    Posts:
    3,033
    Get the InputField component from the object. Make sure you have a persistent object that stores such data - if it's permanent preferences, you can just use PlayerPrefs to save and load it. I'm sure that's what you need if you're entering it in the main menu. How to do each of those things can be found with a search.