Hello everyone,
I was wondering if there was a simple way (preferably with no plugins) to browse for an image on my local device (mobile or pc) and use it as a material texture during runtime…
Thank You,
Hello everyone,
I was wondering if there was a simple way (preferably with no plugins) to browse for an image on my local device (mobile or pc) and use it as a material texture during runtime…
Thank You,
Hi there,
Check the function LoadImage from Texture2D here is the manual ref the function receive the image as byte[ ] so you could use File.ReadAllBytes that allows to read the bytes from a file and needs the file location.
That should do the work
Great, all I need now is a simple file browser that works with all platforms (preferably native browser), any one knows how? I found several in game file browsers in the asset store but is there any way to trigger the platform’s default browser?
Thank You,
You’re going to have to look at the platform’s API in order to invoke native windows. Each platform will be different, and you’ll probably need some sort of DLL/SDK to access OS calls. This won’t be a catch all solution.
Ok thank you…