- Home /
How can I pick image/(s) from a VR device at runtime?
Hi,
My basic purpose is to allow a VR device user to pick a custom image from his device gallery & use it in my application. Any ideas/suggestion on how can this be achieved? I am open to using ready assets/libraries for achieving the purpose.
I tried googling but could only find Image Pickers for Android/iOS. None for VR. Any help would be appreciated.
Once I have done this by searching all files within specified folder. Player has been pressing pad on the left controller and circular window with all found files appeared. After pointing one of a file and releasing the pad file has been picked.
Could you please share any kind of code snippets for the same?
I'm not able since I'm not working with VR anymore (thanks God) and don't have access to the project. Basically the flow was:
Check if the pad is pressed.
Search every file with required extension within directory (I was looking for every .mp4 within /$$anonymous$$y Documents/Video).
Create circular panel (world canvas) with file names and icons (I didn't manage to get real, Windows-like icons, that was some kind of generic image - the project was only for testing purposes). I have shown only first 15 files, but it could be paginated/bigger, any other suitable layout.
Because of the circular layout I was checking current position of the pointer and calculating angle. Single file was taking 360/NumberOfFiles deegres, so the script was able to find currently highlighted file. I've made this based on angle not colliders, because I thought it will be easier to navigate without need of ai$$anonymous$$g to small colliders (especially when 15 files appeared).
Once the pad was released circular panel became inactive and last highlighted file was loaded.
I'm not able to reproduce the code since I don't have any VR set, but I was using S$$anonymous$$mVR asset. Hope it will give you some ideas how to do this :)
Your answer
Follow this Question
Related Questions
How to create image slider using unity 2 Answers
How do I exclude images from the Android gallery 1 Answer
Error while loading image from Windows Phone gallery 1 Answer
(MixedReality-WebRTC) Shared screen and offset problem 0 Answers
How to get the vertices positions of the meshes on the hand in Oculus Quest? 1 Answer