How to send event to my canvas via script
I'm creating a 3D UI for virtual reality which is essentially a panel that follows your left hand and a cursor in your right hand. Right now, I have a Vector3 which is the projection of my cursor projection on the UI panel and a "state" which is either hover, clicked or none depending on the height of my cursor relative to my panel. My panel has a UI in world space attached to it and i'm now struggling to send a signal that "The cursor is in this position (Vec2) and it's in the "clicked" (or not) state". I've completely removed the event system and InputModules as these are to fetch the actual mouse, but there is none in my VR project.
Is there a way to tell my canvas where the cursor is and if the mouse is clicked from code? Thanks in advance for reading me, and for any solution or ideas :)
Your answer
Follow this Question
Related Questions
UnityEngine.UI and UnityEngine.EventSystem do not work, what do I do? 1 Answer
UI Text: Words at end of line jumping to next line 0 Answers
ui Text not responding to collider 1 Answer
How do I unparent a child object with C#? For Google VR 1 Answer
c# - error CS0103: The name `hit' does not exist in the current context (cardboard switching) 1 Answer