|
Hey! I have a GameObject with a GUI script attatched to it, and i need to print the selected objects name (Useing raycast to select object), so i need to access the selected GameObject's name from the GUI script. Is this possible? Thanks! //Tommy
(comments are locked)
|
|
You can just use name, e.g. :
will print the name of the gameobject the script is attached to You can use that like this to find out the name of the object under your cursor in c#:
or js:
(comments are locked)
|
|
Try this, haven't tested it myself and not sure if a string would be returned but it's worth a try.
(comments are locked)
|
