So I’ve noticed the WWW class allows me to load files into my game, specifically loading an image directly onto a texture. Now I’m trying to find if I can build a GUI that allows me to navigate directories on my machine.
For example, I have an image “flower.jpg” sitting on my desktop. When I run my game, I’d like to be able to use the interface to goto the desktop and select the specific file, then pass the ‘url’ for that directory to a WWW object.
long story short/tldr: Is the a way for the GUI class to navigate the directories of the host computer?
Yes, it involves programming a bunch of lines of GUI code. ;) Or you can get [UniFileBrowser][1]. To use it, just do something like function OnGUI () { if (GUILayout.Button("Open File")) SendMessage("OpenFileWindow"); } function OpenFile (filePath : String) { var www = new WWW("file://" + filePath); renderer.material.mainTexture = www.texture; } [1]: http://starscenesoftware.com/Utilities.html#UniFileBrowser
– Eric5h5