Quantcast
Viewing latest article 21
Browse Latest Browse All 91

Answer by AyAMrau

Calling GetComponent will get the text field assigned to the same game object as the script. You need to get a reference to the object holding the text field. Either make a variable that can be assigned in the editor [SerializeField] Text text2; Or find the object at runtime.

Viewing latest article 21
Browse Latest Browse All 91

Trending Articles



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