Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: andycoke on October 26, 2017, 06:14:44 AM

Title: Raycast for UI elements [SOLVED]
Post by: andycoke on October 26, 2017, 06:14:44 AM
Hi all, I've been using a Raycast on a camera and pointer to select/interact with gameObjects which works fine. I want to use a similar method for UI elements. From what I understand I need a Graphic Raycaster but that doesn't seem to be in Playmaker or the Ecosystem. Am I missing something?
https://docs.unity3d.com/Manual/script-GraphicRaycaster.html

I've looked at using GUI Element Hit Test but it seems a bit backwards as I have to attach to every UI element, rather than just once to the camera/pointer. Also, I have to add an old GUI Texture component to each element.

Many thanks, Andy
Title: Re: Raycast for UI elements
Post by: djaydino on October 26, 2017, 01:09:01 PM
Hi,
You need to get the 'ugui proxy full' (this includes a bunch of ugui actions) on the Ecosystem (https://hutonggames.fogbugz.com/default.asp?W1181)

this video  can get you started :


Title: Re: Raycast for UI elements
Post by: andycoke on October 30, 2017, 12:03:46 PM
Thanks djaydino, much appreciated.