-
Notifications
You must be signed in to change notification settings - Fork 88
Description
Because TmxMap takes a file path, it can't be used with a web or android target. Instead, there should be an option to provide a string of data.
In Unity, there's a variety of ways to load in streamed/external asset data. On Web and Android targets however, there's no way to directly open streamed data as a file. Here you would use in unity a WWW object, which on Web downloads the file and on Android loads it in from the zipped package.
https://docs.unity3d.com/ScriptReference/Application-streamingAssetsPath.html
However, WWW will only give you a text string, which can't be fed into TiledSharp.
Currently the only workaround I can figure out is to use temporary files (which on Web will make use of local storage). This is however a needlessly error-prone and badly performing solution.