Quantcast
Channel: Questions in topic: "error message"
Viewing all articles
Browse latest Browse all 2891

,Error Cs0119

$
0
0
Hi, I make a script in Unity 2018 where Instantiate a Button from a prefab and put a tet in him. The code is: using UnityEngine; using UnityEngine.UI; using Unity.Collections; using System.Collections; using System.Collections.Generic; public class Dialogo : MonoBehaviour { public Parlamento parlamento; private int i = 0; private int j=0; public Text panelDeDialogo; public Text button; public GameObject boton; public GameObject padre; void Start() { //boton = GetComponent (); for(int j=0; j < parlamento.respuestas.Length; j++ ){ GameObject tmp = Instantiate(boton, panelDeDialogo.transform) as GameObject; tmp.transform.parent=padre.transform; tmp.GetComponent.text = parlamento.respuestas [j]; } } But when I type the .text the compiler give me an error CS0119 and I dont know how resolve it. Sorry for my English and thank you for your responces. ,

Viewing all articles
Browse latest Browse all 2891

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>