I'm been stuck for a while trying to load an image into a UI in Unity, I checked documentation before to make a plan for create an application that will be required load images stored into the device.
So I used Loader.load(url), its didn't works thought, because i can't acces to another directory different to "StreaningAssets".
Trying to figure out an other way to load an image now I'm using Loader.loadBytes(bytes); and BitmapData.draw(LoaderInfo.loader); that in flash it's works fine but in scaleform nothing happens, no error message is displayed and image never is shown.
Now I can't imagine another way to solve this issue.
Documentation says:
Loader.load - supported
Loader.loadBytes - supported
LoaderInfo.bytes- supported
But seems it's not all true, now I'm disapointed with this annoying issues.
I hope some one can help to clarify the proper way to get load an image that is not in the "StreamingAssets", it is a requeriment for mi app, I don't want to dispense with scaleform for development the studio's uis but this is a big issue for us.
BitMap operations are kinda fuzzy regarding support ; read http://forums.autodesk.com/t5/Scaleform-Unity-Development/INVESTIGATING-new-BitmapData-100-100-crash...
Don't try to depend on it.
Thanks, currently we abandon the idea to use scaleform in a few sections our app were some images are needed to be updated as news, it´s a shame this issue in scaleform, now we are using Unity GUI to solve this requirement.
Hi Richard Mc!
Seems using "SFManager.ReplaceTexture" as you suggest we can solve our request to show images that are not compiled with the app.
Just instead to use 'Texture t1 = Resources.Load("texture") as Texture2D;' as the demo suggest, I changed that by 'WWW www = new WWW("file://" + Application.persistentDataPath.ToString() + "texture.png"); t1 = new Texture2D(128, 128, TextureFormat.DXT5, false); www.LoadImageIntoTexture(t1 as Texture2D);' and these works for us.
Thanks for your help.