yasirkula / UnitySimpleFileBrowser

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

Simple File Browser - Click & Head Tracking #24

Closed alitokur closed 3 years ago

alitokur commented 3 years ago

Description of the bug

Dear Sir, I am using your "simple file browser" for my VR project. Actually, it's working well but there is something that I did not get it. I can select the files from the list but i cannot click them. I can interact with all the buttons in my interface, but I cannot click the files in the file list. In addition, my oculus rift headset acting like a pointer when I'm on the file list panel. While I moving my head from up to down or vice versa I can select the files like my pointers.

Reproduction steps

-changing the canvas render mode "overlay to wordspace.

Platform specs

Screenshot ss

yasirkula commented 3 years ago

By default, files are selected on double click. However, you can change this behaviour by setting FileBrowser.SingleClickMode to true.

alitokur commented 3 years ago

that is my bad. I ve disabled the button component. now it's working i can select the files. yet I don't understand why my headset acts as a pointer on the file list menu.

yasirkula commented 3 years ago

I haven't implemented any VR input modules for this plugin. Your headset SDK is probably causing the headset to act as a pointer for all UI objects, including FileBrowser.

alitokur commented 3 years ago

probably, thank you for the help sir 👍

yaalisri commented 2 years ago

Does this work for VR based Unity projects on iOS and Android? Is It possible to render the file picker in worldspace?

yasirkula commented 2 years ago

Since it's created with uGUI, of course! You can place the SimpleFileBrowserCanvas prefab to your scene, change its Canvas Render Mode, position it as you wish and at the beginning of the game (in your script's Start function), deactivate the file browser GameObject. SimpleFileBrowser will now use the SimpleFileBrowserCanvas instance in your scene.

yvonneradke commented 1 month ago

Hi! I have a similar problem but can't seem to find the solution. I'm using the file browser with the meta quest 3 and hand tracking. The hand tracking is done with the Meta XR Interaction SDK. I can click all the buttons and the quick links on the left side of the panel but I cannot interact with the files and folders shown in the right side of the panel at all. Any ideas as to why this happens?

yasirkula commented 1 month ago

@yvonneradke There are nested GraphicRaycasters in SimpleFileBrowserCanvas. Do you need to change them to work with Meta XR SDK?

yvonneradke commented 1 month ago

I already deleted the GraphicRaycaster and added a Tracked Device Graphic Raycaster. Since it's working for most of the canvas (expect for the middle right part) I assumed that I might need to change something in the code for this area.

yasirkula commented 1 month ago

Did you perform this operation on the GameObject called "Files"? If so, I'd recommend deleting Canvas and Graphic Raycaster from that GameObject and all the other nested canvases (there are others in there).

yvonneradke commented 1 month ago

It's working now, thank you for your help!

yvonneradke commented 1 month ago

@yasirkula Sorry to bother you again, but I stumbled upon another problem. I want to use the file browser to open obj files. The problem is that the obj loader needs raw path data, which is not given when I am using SAF, but if I set shouldUseSAF to false, my obj data is not displayed anymore and I cannot select it. Do you have a solution to this problem?

yasirkula commented 1 month ago

You can copy the file to temporaryCachePath via FileBrowserHelpers.CopyFile. You can find an example of this at the end of the example code.