- Home /
Allowing a user to choose there own profile image?
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
Use this nice plugin.
Answer by vfxjex · Jun 24, 2014 at 06:42 PM
check this out
http://u3d.as/content/starscene-software/uni-file-browser/1th
http://u3d.as/content/pigasus-games/file-browser-save-load-ui/3rU
Answer by Suyujin · Jun 24, 2014 at 07:25 PM
Well if you are looking to build everything from the ground up, you'll want to start here.
http://msdn.microsoft.com/en-us/library/07wt70x2%28v=vs.110%29.aspx
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.
https://www.youtube.com/watch?v=tzSFTGXvZyc
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.
http://docs.unity3d.com/ScriptReference/GUI.BeginScrollView.html
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!
Answer by Voxel-Busters · Aug 13, 2015 at 06:14 PM
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.
Your answer
Follow this Question
Related Questions
will unity run on the android browser 2 Answers
A node in a childnode? 1 Answer
Unity games and web comunication 1 Answer
App been killed when open browser? 0 Answers
"3th Party Library for MPEG 4 Video From images" under Unity for mobile 2 Answers