SHARE
TWEET

Untitled

a guest Aug 25th, 2019 80 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. using UnityEngine;
  3. using UnityEngine.UI;
  4.  
  5. public class CharacterName : MonoBehaviour
  6. {
  7.     public InputField heroNameInputField;
  8.     public Text heroNameIF;
  9.     public string heroName;
  10.  
  11.     void Start()
  12.     {
  13.         heroNameInputField = heroNameInputField.GetComponent<InputField>();
  14.         heroName = heroNameInputField.text;
  15.         Debug.Log(heroNameInputField);
  16.     }
  17.  
  18. }
  19.  
  20. /*
  21.  
  22.         public InputField heroNameInputField;
  23.     public string hName;
  24.     void Start()
  25.     {
  26.         heroNameInputField.onEndEdit.AddListener(SetHeroName);
  27.     }
  28.  
  29.     void SetHeroName(string s)
  30.     {
  31.         hName = s;
  32.         Debug.Log("ustawiono nazwe " + s);
  33.     }
  34.  
  35. */
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top