Quantcast
Channel: Latest Questions on Unity Answers
Viewing all articles
Browse latest Browse all 171066

GUI Text wont display name of gameObject

$
0
0
I want to make GUI Text to show up when I hover mouse over gameObject, and I want to display gameObject's name. Problem is that when I hover over gameObject GUI Text is created but I cant seen it anywhere. Here is part of code that uses GUI Text: var name : String = "Player" var textObject : GUIText; function OnMouseEnter() { textObject.text = gameObject.name; Instantiate(textObject, transform.position, transform.rotation); }

Viewing all articles
Browse latest Browse all 171066

Trending Articles



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