Topic: Offline resources in StreamingAssets folder

Hi,
I need to create a desktop app with offline tiles.
I can only use "Resources" folder to use it.
The huge amont of tiles is complicated in resources, because of Unity importing assets.
And i don't talk about building the app...

Any tip to change the Resources folder to the StreamingAsset folder instead ?

Best regards

Re: Offline resources in StreamingAssets folder

Hello.

You can already use StreamingAssets.
Example:
http://infinity-code.com/atlas/online-m … ample.html

How to load tiles from StreamingAssets (insert this into line 29 of the example):

string filename = Application.streamingAssetsPath + "\\OnlineMapsTiles\\" + tile.zoom + "\\" + tile.x + "\\" + tile.y + ".png";
if (!File.Exists(filename))
{
    OnlineMaps.instance.StartDownloadTile(tile);
    return;
}

byte[] bytes = File.ReadAllBytes(filename);
tileTexture.LoadImage(bytes);
tileTexture.wrapMode = TextureWrapMode.Clamp;

P.S. Your filename may be different.
I simply renamed Resources to StreamingAssets.

Kind Regards,
Infinity Code Team.

Boost your productivity a lot and immediately using Ultimate Editor Enhancer. Trial and non-commerce versions available.

Re: Offline resources in StreamingAssets folder

Hi,

This is a perfect workaround, i will use it.
I was thinking to use it in the drop down menu to select different location type in the editor, because i'm lazy ^^'

Thank you for your answer.

Best regards