yasirkula / UnitySimpleFileBrowser

A uGUI based runtime file browser for Unity 3D (draggable and resizable)
MIT License
816 stars 111 forks source link

problem with vr #27

Closed frere97 closed 3 years ago

frere97 commented 3 years ago

i'm having a little problem using this asset with oculus rift, the object SimpleFileBrowserItem in filesContainer does not response to my seted pointer, instead it responses to my main camera as a pointer (probably a problem with OnPointerEnter void, but i'm not sure)

yasirkula commented 3 years ago

Can you create a new UI-Button object in the canvas and see if it suffers the same issue? If it does, it shouldn't be related to SimpleFileBrowser but rather the VR plugin's UI input module.

frere97 commented 3 years ago

the button does not suffer the issue, and i could relate, that the quick lins also follow my eyes, but when i use the cursor it stop's following they and start following the cursor

yasirkula commented 3 years ago

I lack the necessary VR experience to answer this question, sorry :/ I've seen this project in the past, perhaps its author can answer your question: https://www.reddit.com/r/virtualreality/comments/i1tzyw/my_vr_game_where_you_can_give_any_image_the/

frere97 commented 3 years ago

ok, thanks

frere97 commented 3 years ago

so, i figured out the problem, u need to add a OVR Raycaster in every canvas object in order to this work, otherwise he gets the "main cursor" that is the middle eye. The other canvas is the "Files" Gameobject, adding a OVR Raycaster in there will fix the problem.

just uppdating in case someone finds this problem in the future

yasirkula commented 3 years ago

Thank you for sharing your findings. They are useful not only to other users but to me, as well.

LittleCoinCoin commented 2 years ago

Hello, Thank you @frere97 for sharing your solution.

I ran into the same issue but with Unity XR Interaction toolkit. In that case the component to add is Tracked Device Graphic Raycaster.

Best!