1 (edited by Sinthien 2020-04-05 11:22:58)

Topic: Cached Tiles dont load properly

Hello again,
i used your wonderful script https://forum.infinity-code.com/viewtopic.php?id=1052 and loaded some tiles to the cache.
If i restart with source set to resources only some tiles get loaded if i zoom out. On zoom in nothing get loaded and even the previously shown tiles cease to show.
Did i mess somethin up ?

Folder structure is "Assets/StreamingAssets/Tile Cache/".

If i use "Assets/StreamingAssets/Tile Cache/{zoom}/{x}/{y}" then nothing will be shown.

Re: Cached Tiles dont load properly

Hello.

Interception of downloading tiles, which is used in the script that you mention, will not work with Source - Resources, because in this mode the map searches for tiles only in the Resources folder, and you cannot put something in this folder after build.

Kind Regards,
Infinity Code Team.

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

3 (edited by Sinthien 2020-04-05 12:11:27)

Re: Cached Tiles dont load properly

It doesn't load any tiles from the given folder, whether they been there since start or not.
I managed to load tiles and save them to the given folder; settings been Resources and Online as u mentioned. Works.
Then i restart with settings Resources only with the intention to see the preloaded tiles, but they dont show up.

In other words: i put some tiles to the given folder before starting the game, then start it with offline settings, map doesnt show up. I checked all folder-paths btw.

Re: Cached Tiles dont load properly

StreamingAssets and Resources are different folders that have different purposes.
https://docs.unity3d.com/Manual/SpecialFolders.html
Online Maps has a built-in way for loading tiles from Resources, but does not have from StreamingAssets.

You can manually load tiles from StreamingAssets by intercepting a request using OnlineMapsTileManager.OnStartDownloadTile.
http://infinity-code.com/doxygen/online … 3a0078248d
https://docs.unity3d.com/Manual/StreamingAssets.html

P.S. I think the ability to load tiles from StreamingAssets will be useful and we will add this feature in Online Maps v3.8.

Kind Regards,
Infinity Code Team.

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