Advertisement
Guest User

Untitled

a guest
Mar 31st, 2023
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.57 KB | None | 0 0
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. using UnityEngine.UI;
  5. using TMPro;
  6.  
  7. public class Name : MonoBehaviour
  8. {
  9.     public GameObject inputField; // get the input field
  10.     public TMPro.TextMeshProUGUI textDisplay; //text to display the text keyed inside the input field
  11.  
  12.  
  13.     // Start is called before the first frame update
  14.     void Start()
  15.     {
  16.        
  17.     }
  18.  
  19.     // Update is called once per frame
  20.     void Update()
  21.     {
  22.         textDisplay.SetText("Welcome" + GetComponent<InputField>().textComponent.text);
  23.     }
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement