Use the WWW class, and provide a file url in the form of:
var url = "file://C:/test/tex.png";
You can then read out the www.texture value once the www request has completed. For example:
function Start () {
// Start a download of the given URL
var www : WWW = new WWW (url);
// Wait for download to complete
yield www;
// assign texture
renderer.material.mainTexture = www.texture;
}
This should work in standalone builds, but won't work for webplayer builds.
I believe you use persistentDataPath after extacting the data into it at runtime:
function Start () {
// Start a download of the given URL
var www : WWW = new WWW (Application.persistentDataPath + "filepathinPersistentData");
// Wait for download to complete
yield www;
// assign texture
renderer.material.mainTexture = www.texture;
}
That will work on android, might work on webgl depending on permissions, not sure about that one.