[SOLVED] Raycast for custom button JS

Hey, guys!

I’m trying to create custom buttons with a PSD (can be made any other format if necessary) image, and I have a hover, pressed, and regular image. How could I get this to work as buttons in a 2D environment?

I’ve looked at Raycast, but I don’t really understand it nor can I figure out how to code it for buttons.

Does anyone have some example code, if they would be able to supply it?

Thanks for the help in advance!

You don’t need any raycasting, just use the GUI system. Either GUI.Button, or else use the new UI button object in Unity 4.6.