Hello everyone,
New poster and fairly experienced Unity user here!
I’ve run into a small problem with one of my projects, and after furiously searching google I have decided to come here for answers.
The problem:
In my project, our lead-designer decided to instead of using the OnGUI() function for the menu, he wanted 3D objects as buttons.
The problem is, I don’t know how to get this working.
I’ve tried several RayCast tutorials, tried attaching scripts to these prefabs to see if the name of the prefab pops up through simple onMouseDown() functions (Note, this does work on other non-prefab gameObjects)
One rayCast script worked, but it printed all the button names, and not the one I clicked on which is likely due to the fact that this script was attached to all buttons on-screen.
If anyone has any advise on how to get this working through each individual button having the same script, or otherwise enabling it through my Main Script which initializes the Menu (Attached to camera), that’d be great.
Hope I was clear enough, and if not, I’ll provide more information if necessary.
-Zubaja-