카테고리 없음

엔터 & 입력

ruripanda 2024. 8. 31. 09:30

인풋 메시지 텍스트 박스

 

using System.Collections;
using System.Collections.Generic;
using TMPro;
using UnityEngine;
using UnityEngine.UI;

public class ButtonController : MonoBehaviour
{
    public Button btn;
    public TMP_InputField inputField;
    public TMP_Text text;
    // Start is called before the first frame update
    void Start()
    {
        btn.onClick.AddListener(() => {

            text.text = inputField.text;

        });
    }