playMaker

Author Topic: Raycast for UI elements [SOLVED]  (Read 3421 times)

andycoke

  • Playmaker Newbie
  • *
  • Posts: 13
Raycast for UI elements [SOLVED]
« 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
« Last Edit: October 30, 2017, 03:34:44 PM by djaydino »

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: Raycast for UI elements
« Reply #1 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

this video  can get you started :


« Last Edit: October 27, 2017, 01:47:38 AM by jeanfabre »

andycoke

  • Playmaker Newbie
  • *
  • Posts: 13
Re: Raycast for UI elements
« Reply #2 on: October 30, 2017, 12:03:46 PM »
Thanks djaydino, much appreciated.