I am working with Android and wish to set up a GUI.button that allows the user to browse their images and select one as their profile picture.
I have searched high and low for 2 days and have come across nothing of use, or that makes sense.
Is it possible with unity to allows users to browse their own ( in this case ) //sdcard for images and then how do i pull those images out and set them to a Texture2D
Well if you are looking to build everything from the ground up, you’ll want to start here.
This will let you find all files in a folder, so as long as you know you’re working with //sdcard/images or whatever the path is, you wont need a custom browser. If you would like to build a browser, though, this video will pretty much walk you through it in just a couple minutes.
Once you have found all the files, you can use the scroll view to make a box you can scroll through, though you may not need to if the video works for you.
Lastly, this will teach you how to save and load your files so you can save their image in a place where you can remember it, and obviously you’re going to want to load the images at some point!
You can use image picker plugin which picks images from Gallery app.
We developed Cross Platform Native Plugins which has MediaLibrary API to pick and save photos to gallery. It provides unified API for iOS and Android and much more features.