Unity 2D Visual Studio text bulunamıyor

Ymn_75

Femtopat
Katılım
1 Şubat 2024
Mesajlar
34
Daha fazla  
Cinsiyet
Erkek
Sorunu Çözdüm merak edenler varsa create>UI>Text-TextMeshpro/Text>(Text-TextMeshPro varsa sizde Text (TPM) diye bir şey çıkacak sadece Text kalacak gerisini siliyorsunuz bu da kod yapıcağınız şeye göre eklenti yaparsınız
Kod:

C#:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

public class Buton : MonoBehaviour
{
    public Text sahnedekiText;
    // Start is called before the first frame update
    void Start()
    {
     
    }

    // Update is called once per frame
    void Update()
    {

    }
        public void ButonIslemler() {


        sahnedekiText.text = "Unity UI";


    }
}
 
Son düzenleyen: Moderatör:

Geri
Yukarı