- Home /
Unity UI - Select with Raycast (Screenspace - Camera)
Hello,
I have built a UI system within Unity (using Unity's UI system). I can select elements with my mouse - and it works fine.
However, I would also like to select (or highlight) objects via a Raycast system too. This is so I can build a 'virtual mouse'.
I'm not really sure where to start with this.
Thanks, Ollie.
--- Update ---
I know that I need to extend the InputModule, so I've started with this:
using UnityEngine;
using System.Collections;
namespace UnityEngine.EventSystems{
public class GestureInputModule : PointerInputModule {
}
}
This is attached to my EventSystem, so I guess I need to pass my raycast data into here, which will be able to call the UI events to the EventSystem?
Your answer
Follow this Question
Related Questions
XR UIHelpers Eventsystem ray is coming out of my main camera rig instead of my hands 0 Answers
StandaloneInputModule allowActivationOnMobileDevice vs forceModuleActive 0 Answers
Unity 4.6 UI - Ignore raycast -1 Answers
How do you perform a Graphic Raycast? 3 Answers
How to get UI element into HMD Unity 5.3.4p1 - Oculus Utilities 1.3 0 Answers